简体   繁体   English

NPM安装在Windows中出错

[英]NPM installation Error in windows

My nodejs recently got corrupt and re-installed. 我的nodejs最近被破坏并重新安装。 Now, i am facing this error while installing npm dependencies. 现在,我在安装npm依赖项时遇到此错误。 What am i missing? 我错过了什么?

C:\Projects\xyz>npm i
/
> bufferutil@1.2.1 install C:\Projects\basic-vplex-sizer-ui\node_modules\bufferutil
> node-gyp rebuild


C:\Projects\basic-vplex-sizer-ui\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Users\ham13\AppData\Roaming\nvm\v4.4.3\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(57,5): error MSB8020: The build tools for v120 (Platform Toolset = 'v120') cannot be found. To build using the v120 build tools, please install v120 build tools.  Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [C:\Projects\basic-vplex-sizer-ui\node_modules\bufferutil\build\bufferutil.vcxproj]

More info: 更多信息: 在此输入图像描述

If Node.js version has been changed, check with node -v then you have to do npm rebuild if still getting the error then delete node_modules folder and do npm install . 如果Node.js版本已更改,请检查node -v然后您必须执行npm rebuild,如果仍然出现错误,则删除node_modules文件夹并执行npm install

Hope that works. 希望有效。

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

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