Skip to content

linux环境无法创建名称包含大写字母的项目, 报Error: NO_MODULES #6436

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

Closed
kentalee opened this issue Apr 24, 2021 · 1 comment · Fixed by #6443
Closed

linux环境无法创建名称包含大写字母的项目, 报Error: NO_MODULES #6436

kentalee opened this issue Apr 24, 2021 · 1 comment · Fixed by #6443

Comments

@kentalee
Copy link

kentalee commented Apr 24, 2021

Version

4.5.12

Environment info

  System:
    OS: Linux 5.8 Ubuntu 20.10 (Groovy Gorilla)
    CPU: (12) x64 Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
  Binaries:
    Node: 15.14.0 - /usr/bin/node
    Yarn: 1.22.10 - ~/.npm/global/bin/yarn
    npm: 7.9.0 - /usr/bin/npm
  Browsers:
    Chrome: 89.0.4389.114
    Firefox: Not Found
  npmGlobalPackages:
    @vue/cli: Not Found

Steps to reproduce

命令行执行vue ui 打开网页界面,输入包含大写字母的项目名,使用默认配置创建项目

What is expected?

项目被正常创建

What is actually happening?

报错Error: NO_MODULES

跟踪代码发现报错处尝试访问项目根目录的node_modules

控制台打印程序访问的path得到:
/mnt/WorkSpace/projects/frontend/apiConfigure

但项目的实际path为:
/mnt/WorkSpace/projects/frontend/apiconfigure

推测原因是linux下ext4文件系统区分大小写导致无法访问项目目录


Error: NO_MODULES
at importProject (/home/kenta/.config/yarn/global/node_modules/@vue/cli-ui/apollo-server/connectors/projects.js:373:11)
at /home/kenta/.config/yarn/global/node_modules/@vue/cli-ui/apollo-server/connectors/projects.js:364:12
at processTicksAndRejections (node:internal/process/task_queues:94:5)
at async Object.wrap (/home/kenta/.config/yarn/global/node_modules/@vue/cli-ui/apollo-server/connectors/progress.js:39:14)

haoqunjiang added a commit to haoqunjiang/vue-cli that referenced this issue Apr 26, 2021
Capital letters are no longer allowed.

Supersedes vuejs#5096 (see more reasoning in that PR)

closes vuejs#2547
closes vuejs#5032
closes vuejs#6436
@haoqunjiang
Copy link
Member

不建议、并且下个版本起将不允许创建名称含大写字母的项目。

参见 #5096 的讨论。具体的校验功能将会在 #6443 实现。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants