求助npm install bcrypt问题,有关于node.js npm安装-gyp rebuild

错误编译BCrypt的-node.js的
我试图通过安装bycrptnpm install使用Windows 7旗舰版64位。
这是我的安装日志:
D:\Dropbox\Projekte\RZ\Finance-Man-GUI\node_modules\bcrypt&node "C:\Program File
s\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node
-gyp.js" rebuild
npm http GET
CodeGo.net
npm http 304
CodeGo.net
npm http 304
CodeGo.net
npm http 304
CodeGo.net
npm http 304
CodeGo.net
npm http 304
CodeGo.net
npm http 304
CodeGo.net
npm http 304
CodeGo.net
npm http 304
CodeGo.net
npm http 304
CodeGo.net
npm http GET
CodeGo.net
npm http GET
CodeGo.net
npm http GET
CodeGo.net
npm http GET
CodeGo.net
npm http GET
CodeGo.net
npm http GET
CodeGo.net
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(29
7,5): warning MSB8003: Could not find WindowsSDKDir variable from the registry.
TargetFrameworkVersion or PlatformToolset may be set to an invalid version nu
mber. [D:\Dropbox\Projekte\RZ\Finance-Man-GUI\node_modules\bcrypt\build\bcrypt_
lib.vcxproj]
blowfish.cc
bcrypt_node.cc
..\src\bcrypt.cc(232): warning C4267: '=' : conversion from 'size_t' to 'unsign
ed char', possible loss of data [D:\Dropbox\Projekte\RZ\Finance-Man-GUI\node_mo
dules\bcrypt\build\bcrypt_lib.vcxproj]
c:\users\timd\.node-gyp\0.8.18\deps\uv\include\ares.h(49): fatal error C1083: C
annot open include file: 'winsock2.h': No such file or directory [D:\Dropbox\Pr
ojekte\RZ\Finance-Man-GUI\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.e
xe` failed with exit code: 1
gyp ERR! stack
at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\
npm\node_modules\node-gyp\lib\build.js:255:23)
gyp ERR! stack
at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack
at Process._handle.onexit (child_process.js:678:10)
gyp ERR! System Windows_NT 6.1.7600
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\Dropbox\Projekte\RZ\Finance-Man-GUI\node_modules\bcrypt
gyp ERR! node -v v0.8.18
gyp ERR! node-gyp -v v0.8.2
gyp ERR! not ok
npm ERR! bcrypt@0.7.3 install: `node-gyp rebuild`
npm ERR! `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR! Failed at the bcrypt@0.7.3 install script.
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:
node-gyp rebuild
npm ERR! You can get their info via:
npm owner ls bcrypt
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7600
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd D:\Dropbox\Projekte\RZ\Finance-Man-GUI
npm ERR! node -v v0.8.18
npm ERR! npm -v 1.2.2
npm ERR! code ELIFECYCLE
npm http 304
CodeGo.net
npm http 304
CodeGo.net
npm http 304
CodeGo.net
npm http 304
CodeGo.net
npm http 304
CodeGo.net
npm http 304
CodeGo.net
& bson@0.1.5 install D:\Dropbox\Projekte\RZ\Finance-Man-GUI\node_modules\mongoos
e\node_modules\mongodb\node_modules\bson
& node install.js || (exit 0)
================================================================================
= Attempting to build bson c++ extension
= Windows: no build will be attempted as binaries are prepackaged
= Unix: on failure the package will still install without the C++ extension =
================================================================================
npm ERR! Additional logging details can be found in:
D:\Dropbox\Projekte\RZ\Finance-Man-GUI\npm-debug.log
npm ERR! not ok code 0
我已经安装了Python &V2.7和.NET SDK 2.0。
我也下载了一个包叫做win7sdkx64.exe这是什么,我觉得SDK为Visual Studio。我喜欢所有的依赖在我Path如下:
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\W%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\nodejs\;E:\Program Files\Java\jdk1.6.0_38\C:\Program Files (x86)\Heroku\C:\Program Files (x86)\ruby-1.9.2\C:\Program Files (x86)\git\C:\Program Files (x86)\git\E:\Program Files (x86)\Heroku\C:\mongodb-win32-x86_64-2.2.2\E:\xampp\mysql\E:\xampp\apache\E:\Python27;C:\Program Files (x86)\Microsoft Visual Studio 8\VC\C:\Program Files\Microsoft Windows Performance Toolkit\;E:\Program Files (x86)\openssl-0.9.8k_X64\bin
但我仍然得到这些错误。
有什么我可以尝试下?安装Visual
本文地址 :CodeGo.net/547556/
-------------------------------------------------------------------------------------------------------------------------
1. 沟BCrypt的模块,原生JavaScript库来代替。从BCrypt-的NodeJS要求,并提供了函数BCrypt的。
这是在Windows 7/8的x64安装BCrypt的过npm正确的方法
安装Python
安装Visual Studio 2012/13快递(或其他)
安装Windows SDK(适用于Windows 7/8)
Win64的安装OpenSSL的v1.0.1e
打开“开发人员命令提示符为VS2012”为administrator,测试安装:
npm install node-gyp -g
npm install bcrypt -g
P.S.我目前的Windows win8的x64上,节点0.10.x.所有的作品不错。
友情链接:
微软的Visual Studio Express的2012年Windows桌面
Windows 8的SDK
节点石膏安装
看着我看到错误
C:\\用户\\ timd.node-石膏\\ 0.8.18 \\相依关系\\ UV \\包括\\ ares.h(49):致命错误C1083:无法打开包含文件:'Winsock 2.h中':没有那个文件或目录
你需要修复,然后才能进一步移动。想必,你已经不是想通了这一点或移动上 CodeGo.net,因为它已经一个月。
看一看在Winsock 2.h中,没有这样的文件或目录
本文标题 :错误编译BCrypt的-node.js的
本文地址 :CodeGo.net/547556/
Copyright (C) 2014 CodeGo.net 沪ICP备号 联系电邮: (#=@)Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
So, I don't know what was wrong before, but the solution was to uninstall Node completely and reinstall it. It came with the module already. I haven't figured out how to use it though because typing node-gyp doesn't work.
I am trying to install node-gyp using Node 8.1 (because I have to use this version). When I type
npm install -g node-gyp
I get the error message "SSL Error: SELF_SIGNED_CERT_IN_CHAIN"
I'm using npm 1.1.33, which I thought might be a problem, so I tried to upgrade using npm by following .
Dallas Brittany@ZTALEI ~
$ npm config set ca ""
Dallas Brittany@ZTALEI ~
$ npm install npm -g
npm http GET https://registry.npmjs.org/npm
npm http 200 https://registry.npmjs.org/npm
npm http GET https://registry.npmjs.org/npm/-/npm-1.4.15.tgz
npm http 200 https://registry.npmjs.org/npm/-/npm-1.4.15.tgz
C:\Users\Dallas Brittany\AppData\Roaming\npm\npm -& C:\Users\Dallas Brittany\Ap
Data\Roaming\npm\node_modules\npm\bin\npm-cli.js
npm@1.4.15 C:\Users\Dallas Brittany\AppData\Roaming\npm\node_modules\npm
Dallas Brittany@ZTALEI ~
But, as you can see, it didn't upgrade anything. So I also tried
npm install npm-latest
and got the following:
npm http GET https://registry.npmjs.org/npm-latest
npm http 304 https://registry.npmjs.org/npm-latest
npm http GET https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/vcsurl
npm http 304 https://registry.npmjs.org/lodash
npm ERR! Error: No compatible version found: lodash@'^2.4.1'
npm ERR! Valid install targets:
npm ERR! ["0.1.0","0.2.0","0.2.1","0.2.2","0.3.0","0.3.1","0.3.2","0.4.0","0.4.1
","0.4.2","0.5.0-rc.1","0.5.0","0.5.1","0.5.2","0.6.0","0.6.1","0.7.0","0.8.0","
0.8.1","0.8.2","0.9.0","0.9.1","0.9.2","0.10.0","1.0.0-rc.1","1.0.0-rc.2","1.0.0
-rc.3","1.0.0","1.0.1","1.1.0","1.1.1","1.2.0","1.2.1","1.3.0","1.3.1","2.0.0","
2.1.0","2.2.0","2.2.1","2.3.0","2.4.0","2.4.1"]
at installTargetsError (c:\Program Files (x86)\nodejs\node_modules\
npm\lib\cache.js:586:10)
at c:\Program Files (x86)\nodejs\node_modules\npm\lib\cache.js:464:
at saved (c:\Program Files (x86)\nodejs\node_modules\npm\node_modul
es\npm-registry-client\lib\get.js:136:7)
at c:\Program Files (x86)\nodejs\node_modules\npm\node_modules\grac
eful-fs\graceful-fs.js:230:7
at Object.oncomplete (fs.js:297:15)
[Error: No compatible version found: lodash@'^2.4.1'
npm ERR! Valid install targets:
npm ERR! ["0.1.0","0.2.0","0.2.1","0.2.2","0.3.0","0.3.1","0.3.2","0.4.0","0.4.1
","0.4.2","0.5.0-rc.1","0.5.0","0.5.1","0.5.2","0.6.0","0.6.1","0.7.0","0.8.0","
0.8.1","0.8.2","0.9.0","0.9.1","0.9.2","0.10.0","1.0.0-rc.1","1.0.0-rc.2","1.0.0
-rc.3","1.0.0","1.0.1","1.1.0","1.1.1","1.2.0","1.2.1","1.3.0","1.3.1","2.0.0","
2.1.0","2.2.0","2.2.1","2.3.0","2.4.0","2.4.1"]]
npm ERR! You may report this log at:
&/isaacs/npm/issues&
npm ERR! or email it to:
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "c:\\Program Files (x86)\\nodejs\\node.exe" "c:\\Program Files
(x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "npm-latest"
npm ERR! cwd C:\Users\Dallas Brittany
npm ERR! node -v v0.8.1
npm ERR! npm -v 1.1.33
npm ERR! message No compatible version found: lodash@'^2.4.1'
npm ERR! message Valid install targets:
npm ERR! message ["0.1.0","0.2.0","0.2.1","0.2.2","0.3.0","0.3.1","0.3.2","0.4.0
","0.4.1","0.4.2","0.5.0-rc.1","0.5.0","0.5.1","0.5.2","0.6.0","0.6.1","0.7.0","
0.8.0","0.8.1","0.8.2","0.9.0","0.9.1","0.9.2","0.10.0","1.0.0-rc.1","1.0.0-rc.2
","1.0.0-rc.3","1.0.0","1.0.1","1.1.0","1.1.1","1.2.0","1.2.1","1.3.0","1.3.1","
2.0.0","2.1.0","2.2.0","2.2.1","2.3.0","2.4.0","2.4.1"]
npm http 304 https://registry.npmjs.org/vcsurl
npm http 304 https://registry.npmjs.org/request
npm ERR! Additional logging details can be found in:
C:\Users\Dallas Brittany\npm-debug.log
npm ERR! not ok code 0
Any suggestions?
Know someone who can answer?
Share a link to this
via , , , or .
Your Answer
Sign up or
Sign up using Google
Sign up using Facebook
Sign up using Stack Exchange
Post as a guest
Post as a guest
By posting your answer, you agree to the
Browse other questions tagged
Stack Overflow works best with JavaScript enabledStack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
Running npm install jasmine-jquery gives the error output seen below.
I'm running Windows 7. Any ideas?
npm install jasmine-jquery
npm http GET https://registry.npmjs.org/jasmine-jquery
npm http 304 https://registry.npmjs.org/jasmine-jquery
npm http GET https://registry.npmjs.org/jsdom
npm http 304 https://registry.npmjs.org/jsdom
npm http GET https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/cssom
npm http GET https://registry.npmjs.org/contextify
npm http GET https://registry.npmjs.org/htmlparser
npm http 304 https://registry.npmjs.org/cssom
npm http 304 https://registry.npmjs.org/htmlparser
npm http 304 https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/contextify
& contextify@0.0.7 preinstall C:\node\node_modules\jasmine-jquery\node_modules\jsdom\node_modules\contextify
& node-waf clean || (exit 0); node-waf configure build
Ov?ntat node-waf.
npm ERR! error installing contextify@0.0.7
npm ERR! error installing jsdom@0.2.10
npm ERR! Error: ENOENT, no such file or directory 'C:\node\node_modules\jasmine-jquery\node_modules\jsdom\node_modules\___htmlparser.npm\package\runtests.min.js'
npm ERR! Report this *entire* log at:
&/isaacs/npm/issues&
npm ERR! or email it to:
npm ERR! System Windows_NT 6.1.7600
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "jasmine-jquery"
npm ERR! cwd C:\node\messagemetrics
npm ERR! node -v v0.6.6
npm ERR! npm -v 1.1.0-beta-4
npm ERR! path C:\node\node_modules\jasmine-jquery\node_modules\jsdom\node_modules\___htmlparser.npm\package\runtests.min.js
npm ERR! fstream_path C:\node\node_modules\jasmine-jquery\node_modules\jsdom\node_modules\___htmlparser.npm\package\runtests.min.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! message ENOENT, no such file or directory 'C:\node\node_modules\jasmine-jquery\node_modules\jsdom\node_modules\___htmlparser.npm\package\runtests.min.js'
npm ERR! fstream_stack Object.oncomplete (C:\Program Files\nodejs\node_modules\npm\node_modules\fstream\lib\writer.js:204:26)
npm ERR! error rolling back jsdom@0.2.10 Error: UNKNOWN, unknown error 'C:\node\node_modules\jasmine-jquery\node_modules\jsdom\node_modules\___request.npm\package\tests'
npm ERR! error installing jasmine-jquery@1.3.3
npm ERR! error rolling back jasmine-jquery@1.3.3 Error: UNKNOWN, unknown error 'C:\node\node_modules\jasmine-jquery\node_modules\jsdom\node_modules\___request.npm\package'
npm ERR! contextify@0.0.7 preinstall: `node-waf clean || (exit 0); node-waf configure build`
npm ERR! `cmd "/c" "node-waf clean || (exit 0); node-waf configure build"` failed with 1
npm ERR! Failed at the contextify@0.0.7 preinstall script.
npm ERR! This is most likely a problem with the contextify package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
node-waf clean || (exit 0); node-waf configure build
npm ERR! You can get their info via:
npm owner ls contextify
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7600
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "jasmine-jquery"
npm ERR! cwd C:\node\messagemetrics
npm ERR! node -v v0.6.6
npm ERR! npm -v 1.1.0-beta-4
npm ERR! code ELIFECYCLE
npm ERR! message contextify@0.0.7 preinstall: `node-waf clean || (exit 0); node-waf configure build`
npm ERR! message `cmd "/c" "node-waf clean || (exit 0); node-waf configure build"` failed with 1
npm ERR! Additional logging details can be found in:
C:\node\messagemetrics\npm-debug.log
npm not ok
1,45063572
Have you tried using sudo?
This worked for me: sudo npm install jasmine-jquery, let me know if this works for you.
Your Answer
Sign up or
Sign up using Google
Sign up using Facebook
Sign up using Stack Exchange
Post as a guest
Post as a guest
By posting your answer, you agree to the
Not the answer you're looking for?
Browse other questions tagged
Stack Overflow works best with JavaScript enabled

我要回帖

更多关于 node安装 npm 的文章

 

随机推荐