sendanor / node-crypt3

crypt(3) for Node.js
MIT License
19 stars 18 forks source link

Cannot install crypt3 #7

Open evil-shrike opened 9 years ago

evil-shrike commented 9 years ago

I'm trying to install Sinopia, which depends on crypt3 which depends on node-gyp. Installation fails. How to blame?

D:\>npm install -g sinopia
Z:\Prog\nodejs\sinopia -> Z:\Prog\nodejs\node_modules\sinopia\bin\sinopia

> crypt3@0.1.6 install Z:\Prog\nodejs\node_modules\sinopia\node_modules\crypt3
> node-gyp rebuild

Z:\Prog\nodejs\node_modules\sinopia\node_modules\crypt3>node "Z:\Prog\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.
  crypt3.cc
..\crypt3.cc(6): fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory [Z:\Prog\nodejs\node_modules\si nopia\node_modules\crypt3\build\crypt3.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `msbuild` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (Z:\Prog\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:797:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "Z:\\Prog\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd Z:\Prog\nodejs\node_modules\sinopia\node_modules\crypt3
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "Z:\\Prog\\nodejs\\\\node.exe" "Z:\\Prog\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "sinopia"
npm ERR! node v0.10.26
npm ERR! npm  v2.1.9
npm ERR! code ELIFECYCLE

npm ERR! crypt3@0.1.6 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the crypt3@0.1.6 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the crypt3 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 crypt3
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     D:\Work\R-n-D\XFW3_WebClient_doc\npm-debug.log
evil-shrike commented 9 years ago

On another machine I'm also experiencing issues with installing:

C:\Work\R-n-D> npm install -g sinopia
C:\Program Files\nodejs\sinopia -> C:\Program Files\nodejs\node_modules\sinopia\bin\sinopia

> crypt3@0.1.6 install C:\Program Files\nodejs\node_modules\sinopia\node_modules\crypt3
> node-gyp rebuild

C:\Program Files\nodejs\node_modules\sinopia\node_modules\crypt3>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 MSB80 07: The Platform for project 'crypt3.vcxproj' is invalid.  Platform='x64'. You may be seeing this message
because you are trying to build a project without a solution file, and have specified a non-default Platfo rm that doesn't exist for this project. [C:\Program Files\nodejs\node_modules\sinopia\node_modules\crypt3\ build\crypt3.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `msbuild` 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:797:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Program Files\nodejs\node_modules\sinopia\node_modules\crypt3
gyp ERR! node -v v0.10.26
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "sinopia"
npm ERR! node v0.10.26
npm ERR! npm  v2.1.9
npm ERR! code ELIFECYCLE

npm ERR! crypt3@0.1.6 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the crypt3@0.1.6 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the crypt3 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 crypt3
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Work\R-n-D\npm-debug.log

C:\...js\node_modules\npm\node_modules\node-gyp\lib>python
Python 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)] on win32
rlidwka commented 9 years ago

I'm trying to install Sinopia, which depends on crypt3 which depends on node-gyp.

crypt3 is optional, and the fact that installation fails is an npm bug: https://github.com/npm/npm/issues/6801

PS: what this issue is asking is windows support, but I don't think it's possible

evil-shrike commented 9 years ago

In joyent/node#4047 @othiym23 said:

Your problem looks like either an issue with crypt3's gypfile or with the version of VS you're using to build it. It's not a Node or npm issue

ppalladino commented 9 years ago

I am having the same issue. Any resolution?

DennisBecker commented 9 years ago

II'm also having this issue on a Debian Wheezy machine.

thejhh commented 9 years ago

Well, we could silently build dummy Windows version that just throws an exception but I don't think that is correct fix.

I've also had these problems with NPM forcing optional packages and I don't know how to fix that. Sounds like a bug in NPM but if that's not true, somebody smarter could explain why it is so.

petershaw commented 9 years ago

i still have problems on this issue. Can't install sinopia. Does you solved the problem? (Debian, node v4.2.1, npm 2.14.7)

cheristi commented 8 years ago

Same issue here, Windows 7.

Under Ubuntu it runs out of the box. Would be nice to have the same experience under windows :)

thejhh commented 8 years ago

Windows does not have the crypt(3) function, so we cannot have same experience under windows.

However some people have reported install issues on Debian, where this should work. Please open another issue about those -- this issue is about non-working Windows support.