-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vue-cli shows "invalid project name" for project names or directories that have uppercase letters #2547
Comments
If anyone's looking for a temporary solution, the check can be bypassed by editing the lib/create.js file. The file's path can be found by running |
|
I think |
As a beginner Vue developer coming from the desktop programming world, this caused a bunch of confusion for me. I always name my desktop projects in Pascal case and it took me a bunch of attempts to figure out why I was getting the error. I could see a user with less patience giving up. I'm glad that I finally know the reasoning behind this, but I would still prefer to keep my normal development naming convention. My work-around has been to use the Vue CLI GUI (which doesn't seem to have the same limitation). I would be happy with a |
closes vuejs#2547 closes vuejs#5032 I'm still very hesitant on adding this feature, though. First, this change allows project creation in a folder with uppercase letters in its name. It is strongly discouraged and may cause many weird issues all over the ecosystem. For example, vuejs#5022, vuejs#4424, vuejs#3665, vuejs#4174#issuecomment-569709494 are all caused by case issues. Adding support for uppercase project names will only worsen this situation. Secondly, it adds a lot of maintenance burden to us. As noted in the comments, these prompts are hard to test right now (because `createTestProject` runs in another process so it's hard to intercept the prompts). Even if such test utilities are added in the future, it's still very tedious to take care of all the case issues in the test suite. What's worse is that we can affect the project folders created by @vue/cli by converting the project name to lower case. But for `vue create .`, we cannot change the current folder's name. So, we'll have another edge case to test.
I've opened a PR implementing this but I haven't decided whether to merge it. #5096 Even if you don't need to publish the package to npm, there could still have edge cases with regard to path cases. It could be a real maintenance burden for us. (And it has already caused many issues). |
Using a PascalCase name is an aesthetic issue most of the time. But the problems it encountered in the Node.js ecosystem are real. |
For whatever it's worth, some businesses have project name requirements that require capital names. Our work does, but sadly we don't use Vue at work, so it's not an issue, but I subconsciously followed our work naming scheme at home now and really think this is a bad idea. |
Capital letters are no longer allowed. Supersedes vuejs#5096 (see more reasoning in that PR) closes vuejs#2547 closes vuejs#5032 closes vuejs#6436
Version
3.0.3
Node and OS info
Node 8.12.0 / yarn 1.9.4 / Ubuntu
Steps to reproduce
The issue can be reproduced by trying to initialize a project that has uppercase letters in its name.
vue create Uppecase
will give this error.This is error isn't so obvious when you try to initialize a project with
vue create .
in the current directory which has uppercase letters in its name. In this case, it just saysInvalid project name: "."
.What is expected?
vue-cli should allow me to create projects that have uppercase letters in their name.
What is actually happening?
vue-cli is not letting me create projects that have uppercase letters in their name.
The text was updated successfully, but these errors were encountered: