vue-cli: CLI does not generate project structure and fails with error NO_MODULES if running ui version
Version
3.0.4
Node and OS info
8.11.4
Steps to reproduce
Fresh install of NodeJS Execute npm i -g @vue/cli Execute vue create test-project and select default settings
What is expected?
A project structure to be created
What is actually happening?
‘.git’ directory created, package.json, package-lock.json and README.md files are created.
If using the vue ui
then the above files are created and an error is thrown.
$ vue ui 🚀 Starting GUI… 🌠 Ready on http://localhost:8000 ⚙ Installing CLI plugins. This might take a while…
up to date in 0.057s 🚀 Invoking generators… 📦 Installing additional dependencies…
up to date in 0.042s
🎉 Successfully created project Test. 👉 Get started with the following commands:
$ cd Test $ npm run serve
Error: NO_MODULES at importProject (C:\Users\xxxxx\AppData\Roaming\npm\node_modules@vue\cli\node_modules@vue\cli-ui\apollo-server\connectors\projects.js:349:11) at progress.wrap (C:\Users\xxxxx\AppData\Roaming\npm\node_modules@vue\cli\node_modules@vue\cli-ui\apollo-server\connectors\projects.js:341:12) at <anonymous> at process._tickDomainCallback (internal/process/next_tick.js:228:7)
I have another computer with matching versions of npm, node and vue and it works fine. For some reason on this computer it fails to execute properly even after multiple restarts, completely removing node, npm, vue and node upgraded to latest version.
About this issue
- Original URL
- State: open
- Created 6 years ago
- Comments: 23
This does not resolve the issue for me.
vue -V 3.7.0
node --version v12.3.1
Windows 10
After setting the
NODE_ENV
variable (and checking it) the error remains. Error: NO_MODULES at importProject (C:\Users\xxx\AppData\Roaming\npm\node_modules@vue\cli\node_modules@vue\cli-ui\apollo-server\connectors\projects.js:363:11) at C:\Users\xxx\AppData\Roaming\npm\node_modules@vue\cli\node_modules@vue\cli-ui\apollo-server\connectors\projects.js:355:12 at processTicksAndRejections (internal/process/task_queues.js:89:5) at async Object.wrap (C:\Users\xxx\AppData\Roaming\npm\node_modules@vue\cli\node_modules@vue\cli-ui\apollo-server\connectors\progress.js:39:14)is your environment set to production? I had the same problem, NODE_ENV was set to production, forgot to set it back to development.
In my case NODE_ENV was unset. when I set it to dev project creation finished fine.
I had the same problem and it was because of my npm access rights so I did a
sudo chown -R $USER /usr/local/lib/node_modules
and also updated the core-js package withnpm install -g core-js
Had the same error and solved it with the same solution: Deleting the folder you want to override.
Seems to have something to do with the existance of the project folder. In the folder /code I already had another folder called “project” In the UI I declered that I wanted to create a new project in: “/code/project” and checked the “overwrite if existing” checkbox. As can be seen in the code the UI wrongly start working in “/code/project/project”. Probably this generates problems in the skeleton generation. When trying to create a project “test” in the folder /code all works correctly.
Running PowerShell as admin fixed similar error for me
npm i --dev is work for me
I tried everything in this thread with no luck. Inspired by @VeegY’s suggestion I noticed that when I created a folder for the app using CamelCase it was getting converted to all lowercase, then stopping at creation with the
Error: NO_MODULES
issue.I named the folder in all lowercase which seems to fix the issue. The dashboard page hangs on creation but after closing the tab and restarting
vue ui
everything seems to be working.im so angry… Thank you @cfbauer. it was the camelcase issue
Same problem here both on 4.0.5, 3.12, 3.11
Environment a docker image FROM node:12.13.0-alpine3.10
where the only operation was installing @vue/cli@version
Operations done through vue UI Here results: