Common errors with NPM install under Windows environment

Source: Internet
Author: User

When the NPM install package is dependent on the Windows environment, some errors often occur, and the following is a personal workaround:

Error One

Missing python environment:

G:\nodejs\moviesite\node_modules\bcrypt>ifNot defined NPM_CONFIG_NODE_GYP (node"D:\Program files\nodejs\node_modules\npm\bin\node-gyp-bin\\. \.. \node_modulesnode-gyp\bin\node-gyp.js"Rebuild)Else(Rebuild) Gyp ERR!Configure Errorgyp ERR! Stack Error:can 'T find python executable "python", you can set the Python env variable.gyp err! Stack at Failnopython (D:\Program files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:103:14) Gyp Err! Stack at D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:64:11gyp ERR! Stack at Fsreqwrap.oncomplete (evalmachine.<anonymous>:95:15) Gyp err! System windows_nt 6.3.9600gyp err! Command "Node" "D:\\Program files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "Rebuild" Gyp err! CWD G:\nodejs\moviesite\node_modules\bcryptgyp err! Node-v V0.12.2gyp err! Node-gyp-v V1.0.3gyp err! Not OKNPM err! Windows_NT 6.3.9600NPM err! argv "D:\\Program files\\nodejs\\\\node.exe" "D:\\Program files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" " Install "" Bcrypt ""--save "NPM err! Node V0.12.2NPM err! NPM V2.7.4NPM err! Code ELIFECYCLENPM err! [email protected] Install: ' node-gyp rebuild ' npm err! Exit Status 1npm err!npm err! Failed At the [email protected] Install script  ' Node-gyp rebuild '. NPM err! Likely a problem with the Bcrypt package,npm err! Not with NPM itself.npm err!     Tell the author, fails on your SYSTEM:NPM err! Node-gyp REBUILDNPM err!     You can get their info via:npm err! NPM owner LS BCRYPTNPM err! There is likely additional logging output ABOVE.NPM err!     Please include the following file with any support REQUEST:NPM err! G:\nodejs\moviesite\npm-debug.log

安装python解决,python(v2.7 recommended, v3.x.x is not supported)
Download: Http://www.python.org/ftp/python/2.7.3/python-2.7.3.msi

Error Two

在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。 
MSBUILD : error MSB3428: 未能加载 Visual C++ 组件“VCBuild.exe”。要解决此问题, 
1) 安装 .NET Fram 
ework 2.0 SDK;2) 安装 Microsoft Visual Studio 2005;或 3) 如果将该组件安装到了 
其他位置,请将其位置添加到系统 
路径中。 [G:\nodejs\moviesite\node_modules\bcrypt\build\binding.sln] 
gyp ERR! build error

Need to install Microsoft Visual Studio Express for Windows Desktop
(The version should not be limited, I installed the above version)

The installation was successful, but there was a warning that the warning did not affect the use of bcrypt

Common errors with NPM install under Windows environment

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.