Unable to create application because name contains uppercase letters
See original GitHub issueNPM packages are not allowed upper case characters in their name, seemingly because unix filesystems are case-sensitive, which creates “a recipe for confusion and nonportable software”.
This makes perfect sense in the context of libraries intended as portable software; however, not so much when speaking about end-of-the-line applications, especially those developed in a case-insensitive environment like Windows.
PR1652 introduced project name validation using validate-npm-package-name
, assumedly to avoid issues with output displaying spaces in names.
Should “React applications”, being a different (eg: less focused on “portability”) category of software, have these same restrictions?
For example, I am not trying to make an npm package / library. I am trying to use create-react-app
to generate an application, and I need to follow application naming conventions in my company which requires the use of capital letters in the application name.
> create-react-app MyApp
Could not create a project called "MyApp" because of npm naming restrictions:
* name can no longer contain capital letters
Why does this restriction need to apply to react applications / create-react-app
and, if it doesn’t, can this solution to #1649 be reconsidered? Perhaps with a subset of the npm restrictions more suited to applications?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:8 (4 by maintainers)
I’m glad you found a workaround.
I am hesitant because npm explicitly disallows this (I can’t even run
npm init
with a capitalized name). I understand it doesn’t matter if you don’t publish, but it’s going to be confusing for:Also, who knows if some future version of
npm
will even support runningnpm install
in such folders. Or if it becomes buggy because this way of doing things is clearly neglected / frowned upon by thenpm
client.So it’s just not worth the maintenance risks and costs to me.
If it truly hinders your productivity, I’m sorry. IMO there are more important things to stress over, and I wouldn’t spend too much energy on folder naming 😉 .
I see your point but I don’t think it’s worth complicating the validation logic with special cases like this. There’s no uppercase name that can’t be converted to
the-way-npm-likes-it
, and while you’re right it probably doesn’t matter in this case, I don’t see enough benefit to allow otherwise.