node.js - npm install -g gulp 报错但不影响使用
黄舟
黄舟 2017-04-17 14:50:04
0
1
576
**问题描述**:这个问题之前就有过,但是因为不影响使用,就一直忽略。最近和其他同事的npm比较过,分析较久未得出结论,在github上看了太多的issue,未找到答案,故前来求问请教,望大家帮忙看看,谢谢。

npm日志报错如图1,但不是所有的install都会报错。
比如安装express的时候就么米报错,参见图2。
使用起来又是正常的,参见图3。

我在想,是不是因为个人电脑(win7 64位)的问题。不想重装系统啊~~~
个人猜测:出错在open node modules的目录上,可能和个人电脑的文件夹权限有关,但是我没有设置过文件夹的权限啊,和别人的win7比较过,也没发现不一样的地方。

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(1)
迷茫

The reason has been found. As guessed, after modifying the directory of the folder where nodejs is located to full control, it can be installed normally.
Then when using the command in the project directory, an error will still be reported, and the error will prompt that the command cannot be found.
At this time, a more crude method is used to change the directory of the entire disk to full control.

Hope it helps everyone.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template