简体   繁体   中英

NPM installation Error in windows

My nodejs recently got corrupt and re-installed. Now, i am facing this error while installing npm dependencies. 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 .

Hope that works.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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