简体   繁体   English

npm run build on Windows 10 导致此应用程序无法在您的 PC 上运行

[英]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.尝试在我的系统上运行命令 npm run build 但不断收到此错误。 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.我的问题是我正在使用 nvm,出于我还不知道的原因,当我尝试将节点版本设置为 12.14.0,然后运行 ​​nvm list 时,没有选择任何版本。 I went back to 13.8.0 and nvm list showed that 13.8.0 was selected.我回到 13.8.0 并且 nvm list 显示选择了 13.8.0。

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选项 1 – 通过运行 .msi 安装文件进行设置

  • Its a typical Windows installation and automated.它是典型的 Windows 安装和自动化。
  • No need to add entries in environment varaiable无需在环境变量中添加条目

Option 2 – Setup by extracting .zip file选项 2 – 通过解压缩 .zip 文件进行设置

  • 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.此方法不需要管理员访问权限,可用于在没有管理员访问权限的系统(如官方笔记本电脑或台式机)上的 nodejs 上安装。
  • Removing nodejs is as simple as deleting the folder.删除 nodejs 就像删除文件夹一样简单。
  • You will have to add entries in environment variable if you want to execute node command from any location in windows command prompt.如果要从 Windows 命令提示符中的任何位置执行节点命令,则必须在环境变量中添加条目。

See the link below for more details : install Node.js and NPM on Windows 10有关更多详细信息,请参阅下面的链接: 在 Windows 10 上安装 Node.js 和 NPM

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 npm 在 windows 10 中运行构建 - npm run build in windows 10 使用 npm run build:prod 构建角度应用程序后无法运行 npm run server - can't run npm run server after build angular app with npm run build:prod sh: 1: rimraf: 每当我在 Windows 10 上安装的 vagrant 中运行 npm run build 时都找不到 - sh: 1: rimraf: not found whenever I run npm run build within vagrant installed on Windows 10 npm run build 返回模块未找到:错误:无法在我的 NuxtJS 应用程序中的 docker 容器中解析 - npm run build returns Module not found: Error: Can't resolve in my docker container in my NuxtJS app npm run build 给出 npm ERR! 代码生命周期 - npm run build gives out npm ERR! code ELIFECYCLE 运行 npm run build 抛出错误:无法解析“Vue” - running npm run build throws Error: Can't resolve 'Vue' 呃! 堆栈错误:在使用Windows 10的克隆存储库上尝试运行npm install时找不到Python可执行文件 - ERR! stack Error: Can't find Python executable while trying to run npm install, on a cloned repo using windows 10 无法在 Cmder 上运行 npm 或任何节点模块(Windows 7) - Can't run npm or any Node Module on Cmder (Windows 7) Windows上的节点安装 - 无法从命令提示符运行NPM - Node installation on Windows - Can't run NPM from command prompt Windows 上的 npm run build / deploy 错误 - npm run build / deploy error on windows
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM