Skip to content

Instantly share code, notes, and snippets.

@shabeersha
Last active November 6, 2021 07:15
Show Gist options
  • Save shabeersha/b73b5a2671788c367df397bd5eca32f8 to your computer and use it in GitHub Desktop.
Save shabeersha/b73b5a2671788c367df397bd5eca32f8 to your computer and use it in GitHub Desktop.
npx command does not work on Windows

Running npx does not work on Windows when the user folder path contains a space( space or other special characters in userfolder name/ username )

Error

npm ERR! code ENOLOCAL 
npm ERR! Could not install from "Echo\AppData\Roaming\npm-cache\_npx\14184" as it does not contain a package.json file. 

npm ERR! A complete log of this run can be found in: 
npm ERR!     C:\Users\Grim Echo\AppData\Roaming\npm-cache\_logs\2018-01-03T00_26_34_241Z-debug.log 

Fix:

you can change "npm-cache" folder to anothor path, using command :
npm config set cache C:\npm-cache --global

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment