Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LINK : fatal error LNK1104: cannot open file "?.exe" [*\bcrypt\build\bcrypt_lib.vcxproj] #1034

Closed
clementine07 opened this issue Oct 11, 2016 · 5 comments

Comments

@clementine07
Copy link

clementine07 commented Oct 11, 2016

I can't npm install bcrypt , I have install gyp successfully.
windows 10 x64

npm install bcrypt -g

> bcrypt@0.8.7 install F:\Program Files\nodejs\node_global\node_modules\bcrypt
> node-gyp rebuild


F:\Program Files\nodejs\node_global\node_modules\bcrypt>if not defined npm_config_node_gyp (node "F:\Program Files\nodejs\node_global\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets(366,5): warning MSB8003:
 Could not find WindowsSDKDir variable from the registry.  TargetFrameworkVersion or PlatformToolset may b
e set to an invalid version number. [F:\Program Files\nodejs\node_global\node_modules\bcrypt\build\bcrypt_
lib.vcxproj]
  Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86
  Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

  cl ?


CL : Command line warning D4024: unrecognized source file type '?', object file assumed [F:\Program Files
\nodejs\node_global\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
  Microsoft (R) Incremental Linker Version 6.00.8168
  Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

  /out:?.exe
  ?
LINK : fatal error LNK1104: cannot open file "?.exe" [F:\Program Files\nodejs\node_global\node_modules\bc
rypt\build\bcrypt_lib.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (F:\Program Files\nodejs\node_global\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "F:\\Program Files\\nodejs\\node.exe" "F:\\Program Files\\nodejs\\node_global\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd F:\Program Files\nodejs\node_global\node_modules\bcrypt
gyp ERR! node -v v4.6.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "F:\\Program Files\\nodejs\\node.exe" "F:\\Program Files\\nodejs\\node_global\\node_modules\\npm\\bin\\npm-cli.js" "install" "bcrypt" "-g"
npm ERR! node v4.6.0
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE

npm ERR! bcrypt@0.8.7 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt@0.8.7 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, 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 information on how to open an issue for this project with:
npm ERR!     npm bugs bcrypt
npm ERR! Or if that isn't available, 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!     F:\Users\dell\Documents\SourceTree\crm\npm-debug.log
@bnoordhuis
Copy link
Member

You probably have characters in a file path that cl.exe doesn't like, see http://superuser.com/questions/921620/why-doesnt-visual-studio-2015-rc-compile-properly. Not really an issue with node-gyp or bcrypt.

@clementine07
Copy link
Author

clementine07 commented Oct 11, 2016

I have configured the studio visual 2015 environment variable, a new error has occurred.

`C:\Users\dell>npm install brcypt -g
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "F:\\Program Files\\nodejs\\node.exe" "F:\\Program Files\\nodejs\\node_global\\node_modules\\npm\\bin\\npm-cli.js" "install" "brcypt" "-g"
npm ERR! node v4.6.0
npm ERR! npm  v3.10.8
npm ERR! code E404

npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/brcypt
npm ERR! 404
npm ERR! 404  'brcypt' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\dell\npm-debug.log`

@bnoordhuis
Copy link
Member

Try spelling 'bcrypt' correctly.

@clementine07
Copy link
Author

Thanks , i have solve this problem.(still have yellow warning ,but can run) Because i don't add visual C++ professional items resouce package in my visual studio 2015(update 1).

C:\Users\dell>npm install bcrypt -g

> bcrypt@0.8.7 install F:\Program Files\nodejs\node_global\node_modules\bcrypt
> node-gyp rebuild


F:\Program Files\nodejs\node_global\node_modules\bcrypt>if not defined npm_config_node_gyp (node "F:\Program Files\nodejs\node_global\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
  blowfish.cc
  bcrypt.cc
  bcrypt_node.cc
  win_delay_load_hook.cc
..\src\bcrypt.cc(232): warning C4267: “=”: 从“size_t”转换到“unsigned char”,可能丢失数据 [F:\Program Files\nodejs\node_global\node
_modules\bcrypt\build\bcrypt_lib.vcxproj]
..\src\bcrypt_node.cc(76): warning C4244: “参数”: 从“ssize_t”转换到“unsigned char”,可能丢失数据 [F:\Program Files\nodejs\node_globa
l\node_modules\bcrypt\build\bcrypt_lib.vcxproj]
..\src\bcrypt_node.cc(229): warning C4267: “初始化”: 从“size_t”转换到“int”,可能丢失数据 [F:\Program Files\nodejs\node_global\node_mo
dules\bcrypt\build\bcrypt_lib.vcxproj]
..\src\bcrypt_node.cc(230): warning C4267: “初始化”: 从“size_t”转换到“int”,可能丢失数据 [F:\Program Files\nodejs\node_global\node_mo
dules\bcrypt\build\bcrypt_lib.vcxproj]
    正在创建库 F:\Program Files\nodejs\node_global\node_modules\bcrypt\build\Release\bcrypt_lib.lib 和对象 F:\Program Files\nod
  ejs\node_global\node_modules\bcrypt\build\Release\bcrypt_lib.exp
  正在生成代码
  已完成代码的生成
  bcrypt_lib.vcxproj -> F:\Program Files\nodejs\node_global\node_modules\bcrypt\build\Release\\bcrypt_lib.node
F:\Program Files\nodejs\node_global
`-- bcrypt@0.8.7


C:\Users\dell>node
> require ('bcrypt')
{ genSaltSync: [Function],
  genSalt: [Function],
  hashSync: [Function],
  hash: [Function],
  compareSync: [Function],
  compare: [Function],
  getRounds: [Function] }
>

@bnoordhuis
Copy link
Member

Good to hear. I'll go ahead and close the issue. If you want to see the warnings fixed, you should get in touch with the node-bcrypt project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants