问题描述
我已经将NPM从5.3.0升级到5.4.1,此后,似乎只有在删除 node_modules 后,命令 npm install 才有效.当我尝试重新运行安装时,出现以下错误消息. (此后,如果我再次删除 node_modules ,则命令 run install 有效-一次.)
I've upgraded NPM from 5.3.0 to 5.4.1 and after that, it seems that the command npm install works only if I've removed node_modules. When I try to rerun the installation, I'm getting the following error message. (After that, if I again remove node_modules, the command run install works - once.)
据我所知,我的设置没有其他改变.我的环境是Windows 10和Node 8.2.1.该行为似乎在多台计算机上是一致的.
Nothing else has changed in my setup, as far I'm aware. My environment is Windows 10 and Node 8.2.1. The behavior seems to be consistent on several computers.
我注意到在重新运行安装过程中,接下来的阶段会有很多等待时间,例如安装程序是否卡住.
I notice that during the re-runs of the installation, there's a lot of waiting time, like if the installer gets stuck, on the following stage of it.
我不知道如何进行此操作.难道是 fsevents 的罪魁祸首吗?我记得它产生了警告,但在早期版本中仍然可以很好地编译.
I have no clue on how to proceed with this. Is fsevents to blame at all? I recall that it produced warnings but still transpiling fine in earlier versions.
关于这个主题,有一个相关问题涵盖我的问题.我无法确定是解决同一问题的不同方式,还是两个单独的麻烦.
There's a related question on this theme but precisely covering my issue. I can't decide if it's just different working of the same problem or if it's two separate troubles.
推荐答案
我正在运行Win 10,并且发现了相同的问题.该决议是降级到5.3.我还注意到5.4.0在我们的构建服务器(TFS 2017)上工作.
I'm running Win 10 and recognized the same issue. The resolution was to downgrade to 5.3. I also noticed that 5.4.0 worked on our build server (TFS 2017).
npm install --global [email protected]
关于管理模式的所有内容根本没有提供任何帮助.我们浪费了几个小时使用管理员权限重新配置和重置构建管道.
One thing that provided no help at all was all the stuff about admin mode. We lost a few hours reconfiguring and resetting the build pipe using admin rights.
出于某些原因,有一个至关重要的模块需要5.4.1,而在此特定情况下与该模块无关.我们通过管道中的单独步骤解决了该问题-一个步骤重复使用了预先构建的版本,而另一个步骤则是动态组装的.
There was a crucial module that required 5.4.1 for some reason, not relevant which in this particular case. We resolved it by separate steps in the pipe - one that reused a pre-built version and one that was dynamically assembled.
我也不必为此担心.在几天左右的时间内,必须进行更新,此问题将得到解决.在此之前-我们使用的破解方法是降级到5.3.
Also, I'd not worry about it. In a few days or so, there's got to be an update and the issue will be resolved. Until then - downgrade to 5.3 is the hack-around we used.
这篇关于无法运行"npm install"升级到NPM 5.4.1后无需删除node_modules的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!