npm安装失败并出现gyp构建错误

 牛牛的牛66_674 发布于 2023-01-12 10:24

我一直试图让节点和git为我正在努力的网络项目工作而没有任何运气.

我已从他们的网站安装了节点.当我尝试在我正在处理的git项目上执行npm install时,它给出了以下错误

C:\Users\Jibran\Desktop\ekhadim\ekhadimweb>npm install
npm http GET https://registry.npmjs.org/bcrypt
npm http 304 https://registry.npmjs.org/bcrypt
npm http GET https://registry.npmjs.org/bindings
npm http 304 https://registry.npmjs.org/bindings

> bcrypt@0.7.8 install C:\Users\Jibran\Desktop\ekhadim\ekhadimweb\node_modules\b
crypt
> node-gyp rebuild


C:\Users\Jibran\Desktop\ekhadim\ekhadimweb\node_modules\bcrypt>node "C:\Program
Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\
node-gyp.js" 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\Microsoft.Cpp.InvalidPlatform
.Targets(23,7): error MSB8007: The Platform for project 'bcrypt_lib.vcxproj' is
 invalid.  Platform='x64'. You may be seeing this message because you are tryin
g to build a project without a solution file, and have specified a non-default
Platform that doesn't exist for this project. [C:\Users\Jibran\Desktop\ekhadim\
ekhadimweb\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
` 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:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:807:
12)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Jibran\Desktop\ekhadim\ekhadimweb\node_modules\bcrypt
gyp ERR! node -v v0.10.28
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok
npm ERR! bcrypt@0.7.8 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt@0.7.8 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:
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! System Windows_NT 6.2.9200
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 C:\Users\Jibran\Desktop\ekhadim\ekhadimweb
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\Jibran\Desktop\ekhadim\ekhadimweb\npm-debug.log
npm ERR! not ok code 0

我已经安装了python,VC++ 2008和2010以及OpenSSL但是没有任何东西对我有用.

任何帮助将不胜感激.

谢谢Jibran

撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有