Invalid name error for packages with spaces even if private is set to true #5490

Closed
kethinov opened this Issue Jun 16, 2014 · 5 comments

4 participants

@kethinov
npm ERR! install Couldn't read dependencies
npm ERR! Error: Invalid name: "Bubble Painter"
npm ERR!     at ensureValidName (/usr/local/lib/node_modules/npm/node_modules/read-package-json/node_modules/normalize-package-data/lib/fixer.js:300:15)
...

I don't think npm should choke on this when private is set to true. (See precedent here: #3692)

Without the ability to suppress this error it pretty much breaks the ability to run npm install on node-webkit apps since the name field in node-webkit's package.json is meant to be a human readable string, such as the one I use with Bubble Painter.

@iarna iarna added the support label Sep 19, 2014
@smikes

Is this still a problem for you? It probably is, since as far as I know nothing about the ordering of package.json validations and install has changed.

Support for frontend and private package management is important, so if you're still interested in this, just email back or comment on this issue and I'll keep it alive.

We are trying to clean up older npm issues, so if we don't hear back from you within a week, we will close this issue. (Don't worry -- you can always come back again and re-open it!)

Thanks!

@kethinov

Just retested it. Still an issue.

@faiq
npm member

Hey, it seems like you have a very specific use case here, and to be perfectly honest I don't think that this would be resolved for a while. Is there any reason you can't use all lower case letters, and separate words with hyphens? If there's not, you should totally submit a pull request trying to implement the feature yourself!

@kethinov

Oh cool, looks like node-webkit fixed it on their side. Their docs now reflect npm's rules and no longer require a human readable string.

So this is no longer an issue!

@kethinov kethinov closed this Nov 21, 2014
@faiq
npm member

woo! glad we could work everything out! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment