Reputation: 2085
I want to create Nuxt.Js app using npx. But i am getting following error.
Upvotes: 2
Views: 9351
Reputation: 11
This problem was resolved in a reddit
https://www.reddit.com/r/vuejs/comments/ie8vab/createnuxtapp_not_working_anyone_else_had_this/
Install it with:
npm i -g create-nuxt-app
Usually npm/npx should propose you to install, but it might not work This issue can appear if during first try the installation was aborted
Upvotes: 1
Reputation: 91
I have encountered similar problem and I have multiple spaces in the username.
If the above solutions does not work for you on Windows, there is another way.
npm init nuxt-app project-name
Point number 3 will only work if you run the VS code editor as Administrator. I am sure it is the same with external terminals. Run CMD/Gitbash as Administrator
Hope this helps. :D
Upvotes: 0
Reputation: 49
I changed npm-cache directory by writing following command
npm config set cache C:\tmp\nodejs\npm-cache --global
After that npx create-nuxt-app <project-name>
worked perfectly.
Upvotes: 3
Reputation: 2684
You have a space in your Windows username. This is a problem with NPX.
This is the path that NPM sees (which is right)
This is the path that NPX sees (which is wrong)
You can fix it by changing your NPM-Cache to another directory (without a space in the path):
npm config set cache C:\your\new\path\npm-cache --global
Source: https://github.com/zkat/npx/issues/146#issuecomment-384016791
Upvotes: 11