简体   繁体   English

npm 安装失败。 如何安装不报错

[英]npm install failing . how to install without error

在此处输入图像描述

Npm install is not completed due to some errors.由于某些错误,Npm 安装未完成。

I;m expecting the npm install successfully completed and ran this local project.我期待 npm 安装成功完成并运行这个本地项目。

According to your error message, you need python installed.根据你的错误信息,你需要安装python。 You can install that from here.你可以从这里安装它。 https://www.python.org/downloads/ https://www.python.org/downloads/

Install python 2.7.1.安装蟒蛇2.7.1。

If this doesnt help, than post your package.json and your node version and the operating system where you run npm install.如果这没有帮助,请发布您的 package.json 和您的节点版本以及您运行 npm install 的操作系统。

And in that case, post again the error after you installed python.在这种情况下,请在安装 python 后再次发布错误。

also run也跑

npm cache verify
rm -rf node_modules
rm package-lock.json // or yarn.lock if you use yarn
npm i 

last will clean up your installation.最后将清理您的安装。

After installing python, in a new terminal.安装 python 后,在一个新的终端中。 (important you open a new terminal) (重要的是你打开一个新的终端)

python --version

npm cache clean in your terminal and please check the version of the node and angular in your machine and fix the version which matches your project then again install the npm npm i在您的终端中npm cache clean ,请检查您机器中节点和角度的版本并修复与您的项目匹配的版本,然后再次安装 npm npm i

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

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