简体   繁体   中英

npm run build on windows 10 gives This app can't run on your PC

Trying to run the command npm run build on my system but keep getting this error. Tried uninstalling node but no luck. Any pointers would be helpful

在此处输入图片说明

The issue for me was that I am using nvm, and for reasons I don't yet know, when I try to set my node version to 12.14.0, and then run nvm list, no versions are selected. I went back to 13.8.0 and nvm list showed that 13.8.0 was selected.

Long story short, make sure you have a selected node version.

you should follow one of two option:

Option 1 – Setup by running the .msi installation file

  • Its a typical Windows installation and automated.
  • No need to add entries in environment varaiable

Option 2 – Setup by extracting .zip file

  • This method does not require admin access and can be used to install on nodejs on a system on which you dont have admin access such as you official laptop or desktop.
  • Removing nodejs is as simple as deleting the folder.
  • You will have to add entries in environment variable if you want to execute node command from any location in windows command prompt.

See the link below for more details : install Node.js and NPM on Windows 10

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM