简体   繁体   English

无法安装ExpressJS-npm抛出错误

[英]Can't install ExpressJS - npm is throwing an error

When I try to install ExpressJS with the command npm install -g express, I get the following errors: 当我尝试使用npm install -g express命令安装ExpressJS时,出现以下错误:

在此处输入图片说明

What can I do about it? 我该怎么办?

I assume node -v gives 0.10.something. 我假设node -v给0.10.something。 Get rid of it and install a newer version of node from nodejs.org. 摆脱它,并从nodejs.org安装较新版本的node。 Also try removing node_modules and npm install everything again. 另外,请尝试删除node_modules并再次npm install

Actually, I fixed the problem by uninstalling the latest version and installing the currently recommended one for most users - version 6.9.1. 实际上,我通过卸载最新版本并为大多数用户安装当前推荐的版本6.9.1来解决了该问题。

The cause of the problem still remains unknown. 问题的原因仍然未知。

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

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