Windows环境下npm install安装包依赖时,常出现一些错误,下面为个人解决办法:

错误一

缺少python环境:

G:\nodejs\moviesite\node_modules\bcrypt>if not defined npm_config_node_gyp (node
"D:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\
node-gyp\bin\node-gyp.js" rebuild ) else (rebuild)
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYT
HON env variable.
gyp ERR! stack at failNoPython (D:\Program Files\nodejs\node_modules\npm\nod
e_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:11
gyp ERR! stack at FSReqWrap.oncomplete (evalmachine.<anonymous>:95:15)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "D:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd G:\nodejs\moviesite\node_modules\bcrypt
gyp ERR! node -v v0.12.2
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
npm ERR! Windows_NT 6.3.9600
npm 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.2
npm ERR! npm v2.7.4
npm ERR! code ELIFECYCLE npm ERR! bcrypt@0.8.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt@0.8.3 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls bcrypt
npm 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) 
下载:http://www.python.org/ftp/python/2.7.3/python-2.7.3.msi

错误二

在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/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

如图:

需要安装Microsoft Visual Studio Express 2013 for Windows Desktop 
(版本应该不限制,我安装的是上边的版本)

安装成功,但是出现了警告,警告不影响bcrypt的使用

Windows环境下npm install常见错误的更多相关文章

  1. window环境下npm install node-sass报错

    最近准备想用vue-cli初始化一个项目,需要sass-loader编译: 发现window下npm install node-sass和sass-loader一直报错, window 命令行中提示我 ...

  2. Electron npm install 常见错误(Linux)

    Linux版本 Ubuntu 12.04 (32bit) 安装Git sudo apt-get install git 生成ssh key #查看有没有sshkey cd ~/.ssh #生成 ssh ...

  3. Electron npm install 常见错误(Windows)

    问题一:node_gyp使用版本不对 if not defined npm_config_node_gyp (node "C:\Users\Administrator\AppData\Roa ...

  4. (转 留存)Windows环境下的NodeJS+NPM+GIT+Bower安装配置步骤

    Windows环境下的NodeJS+NPM+GIT+Bower安装配置步骤 标签: NodeJSnpmbower 2015-07-17 16:38 3016人阅读 评论(0) 收藏 举报  分类: G ...

  5. 浅谈Windows环境下DOS及MS-DOS以及常见一些命令的介绍

    浅谈Windows环境下DOS及MS-DOS以及常见一些命令的介绍 前记 自己是搞编程的,首先我是一个菜鸟,接触计算机这么久了,感觉很多计算机方面的技术和知识朦朦胧胧.模模糊糊,貌似有些贻笑大方了:所 ...

  6. 在windows环境下运行compass文件出现的错误提示解决方案

    在windows环境下运行compass文件出现的错误提示解决方案 例如:经常在项目中运行grunt命令编译scss文件的时候,会出现下面的错误提示 (Encoding::CompatibilityE ...

  7. LInux下npm install 安装失败问题

    现象: 今天公司自己动部署的Jenkins出现了问题,在执行npm install的时候,失败了,下载不到npm,在查阅了各种报错信息之后还是没有解决,发现用淘宝镜像进行安装时,也会有安装不成功的情况 ...

  8. Windows环境下安装PHPUnit

    Windows环境下安装PHPUnit,在此整理一下,以便大家参考. 本人测试安装环境:Windows7(win32) + Apache(2.2.13) + PHP(5.3.6) 1.    以管理员 ...

  9. 4.1. 如何在Windows环境下开发Python

    4.1. 如何在Windows环境下开发Python 4.1. 如何在Windows环境下开发Python 4.1.1. Python的最原始的开发方式是什么样的 4.1.1.1. 找个文本编辑器,新 ...

随机推荐

  1. #HTML:無序、有序與定義清單

    #HTML:無序.有序與定義清單 Maplewing 于 星期六, 12/10/2013 - 09:48 提交 清單在網頁中是很常使用到的東西,故多少還是要了解一下.在HTML中有三種不太一樣的清單, ...

  2. 2014年7月份第3周51Aspx源码发布详情

    Froor高校校园网站源码  2014-7-18 [VS2010]源码介绍:这是一款有关高校门户网站的毕业设计源码,功能相对比较完善,界面也比较美观,对门户网站感兴趣的朋友们可以下载研究一下.该源码功 ...

  3. Ionic 2 rc 添加第三方的插件(plugin) 以Echarts为例

    Ionic2 在升级RC版之后做了很多改变,本文就使用Echarts 图表插件为例.记录一下如何引用第三方插件备忘. 一.再集成终端中使用NPM安装Echarts npm install echart ...

  4. hive学习

    大数据的仓库Hive学习  10期-崔晓光 2016-06-20  大数据   hadoop   10原文链接 我们接着之前学习的大数据来学习.之前说到了NoSql的HBase数据库以及Hadoop中 ...

  5. android 网络请求库的比较

    源码请戳 一. 现有库和选择的库 HttpURLConnection:是Java中的标准类,是对Java中socket的封装. Httpclient:是Apache的开源框架,是对HttpURLCon ...

  6. C语言实现栈

    #include <stdio.h> #include <stdlib.h> #include <stdbool.h> typedef struct stack_t ...

  7. Java并发编程学习笔记(一)——线程安全性

    主要概念:线程安全性.原子性.原子变量.原子操作.竟态条件.复合操作.加锁机制.重入.活跃性与性能. 1.当多个线程访问某个状态变量并且其中有一个线程执行写入操作时,必须采用同步机制来协同这些线程对变 ...

  8. freemarker string= null

    在java代码中经常会出现以下代码: String name; …………………… if(null == name || name.length == 0){ return; } 这行代码用freema ...

  9. ASIHTTPRequest中数据压缩问题与gzip

    出现了类似问题,先mark,以后修改 最近使用asi发现,部分网络回调数据不能正常的json解析,将responseHeaders头打印出来,才发现公司服务器部分数据添加了gzip压缩传输. 最近简单 ...

  10. WebMidiLink

    g200kg > WebMidiLink > 1.Introduction WebMidiLink 2012/06/26 1.Introduction « Prev 1.Introduct ...