Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's wrong with "command not found: create-nuxt-app"

Tags:

npm

npx

nuxt.js

When I use npx to create a Nuxt.js program

PS D:\vue\miniProgram\mt-app> npx create-nuxt-app mt-app
Error: EPERM: operation not permitted, mkdir 'C:\Users\Slade'
command not found: create-nuxt-app

PS. CLI:Windows PowerShell

like image 663
lyanm Avatar asked Oct 29 '25 08:10

lyanm


2 Answers

npm install -g create-nuxt-app

npm create-nuxt-app <app_Name>

like image 114
Thisara Hettikankanama Avatar answered Oct 31 '25 11:10

Thisara Hettikankanama


I assume you have spaces in username. There are still issues regarding it. You'll need to work around it at the time.

  1. Open C:\Users\Slade with Space\.npmrc.
  2. Modify locations:
    prefix=C:\Users\Sladew~1\AppData\Roaming\npm
    cache=C:\Users\Sladew~1\AppData\Roaming\npm-cache
    
    globalconfig=C:\Users\Sladew~1\AppData\Roaming\npm\etc\npmrc
    init-module=C:\Users\Sladew~1\.npm-init.js
    tmp=C:\Users\Sladew~1\AppData\Local\Temp
    userconfig=C:\Users\Sladew~1\.npmrc
    globalignorefile=C:\Users\Sladew~1\AppData\Roaming\npm\etc\npmignore
    
    I suppose many of them may be omitted, but important part here is setting of prefix and cache: if you intend to have username with spaces, it's no problem in referring to it as Sladew~1 (according to the results of dir /x).
like image 23
vintprox Avatar answered Oct 31 '25 11:10

vintprox



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!