vuejs / vue-cli

🛠️ webpack-based tooling for Vue.js Development
https://cli.vuejs.org/
MIT License
29.76k stars 6.33k forks source link

Dependencies not found for projects that contains uppercase letters #4251

Open artrayd opened 5 years ago

artrayd commented 5 years ago

Version

3.9.2

Environment info

  System:
    OS: macOS 10.14.1
  Binaries:
    Node: 10.8.0 - /usr/local/bin/node
    Yarn: Not Found
    npm: 6.9.2 - /usr/local/bin/npm
  Browsers:
    Chrome: 75.0.3770.100
  npmGlobalPackages:
    @vue/cli: 3.9.2

Steps to reproduce

Command line: Vue UI

In browser: Create "ProjectName", with big "P" and "N"

Tasks --> Serve

What is expected?

The project will be served

What is actually happening?

These dependencies were not found:

/Users/newuser/Documents/projects/wheel/ProjectName/node_modules/webpack-dev-server/client/index.js?http://10.0.0.4:8080/sockjs-node in multi ../ProjectName/node_modules/webpack-dev-server/client?http://10.0.0.4:8080/sockjs-node ../ProjectName/node_modules/webpack/hot/dev-server.js ./src/main.js, multi ../ProjectName/node_modules/webpack-dev-server/client?http://localhost ../ProjectName/node_modules/webpack/hot/dev-server.js ../ProjectName/node_modules/webpack-dev-server/client?http://10.0.0.4:8080/sockjs-node ./src/main.js /Users/newuser/Documents/projects/wheel/ProjectName/node_modules/webpack-dev-server/client/index.js?http://localhost in multi ../ProjectName/node_modules/webpack-dev-server/client?http://localhost ../ProjectName/node_modules/webpack/hot/dev-server.js ../ProjectName/node_modules/webpack-dev-server/client?http://10.0.0.4:8080/sockjs-node ./src/main.js /Users/newuser/Documents/projects/wheel/ProjectName/node_modules/webpack/hot/dev-server.js in multi ../ProjectName/node_modules/webpack-dev-server/client?http://10.0.0.4:8080/sockjs-node ../ProjectName/node_modules/webpack/hot/dev-server.js ./src/main.js, multi ../ProjectName/node_modules/webpack-dev-server/client?http://localhost ../ProjectName/node_modules/webpack/hot/dev-server.js ../ProjectName/node_modules/webpack-dev-server/client?http://10.0.0.4:8080/sockjs-node ./src/main.js To install them, you can run: npm install --save /Users/newuser/Documents/projects/wheel/ProjectName/node_modules/webpack-dev-server/client/index.js?http://10.0.0.4:8080/sockjs-node /Users/newuser/Documents/projects/wheel/ProjectName/node_modules/webpack-dev-server/client/index.js?http://localhost /Users/newuser/Documents/projects/wheel/ProjectName/node_modules/webpack/hot/dev-server.js

This relative module was not found:

./src/main.js in multi ../ProjectName/node_modules/webpack-dev-server/client?http://10.0.0.4:8080/sockjs-node ../ProjectName/node_modules/webpack/hot/dev-server.js ./src/main.js, multi ../ProjectName/node_modules/webpack-dev-server/client?http://localhost ../ProjectName/node_modules/webpack/hot/dev-server.js ../ProjectName/node_modules/webpack-dev-server/client?http://10.0.0.4:8080/sockjs-node ./src/main.js


Caused by this issue: https://github.com/vuejs/vue-cli/issues/2547

tripflex commented 4 years ago

I can confirm this is an issue as well

haoqunjiang commented 4 years ago

It's not caused by that issue but it's a reason that we don't want to implement uppercase project name support. It brings so many edge cases that it becomes a maintenance burden for us.

artrayd commented 4 years ago

It's not caused by that issue but it's a reason that we don't want to implement uppercase project name support. It brings so many edge cases that it becomes a maintenance burden for us.

I understand that, so please add error or warning state with small notice about that capital letters aren't supported or just convert it to lowercase automatically. Because today users can easily create project that will not work because of it and it's pretty hard to figure out the reason why it's not working :)

haoqunjiang commented 4 years ago

Yeah, I'm thinking about whether to disallow the creation of projects with uppercase names in the UI or convert it to lowercase.

In this case, the bug is caused by the UI logic missed one case conversion. But I don't know how many more edge cases there would be if we fully support such use cases.

motla commented 4 years ago

issue is still here 😉