Repository navigation
npm install fails for nw.js #558
Description
I followed the instruction to include the "engine": { "nw.js": "0.11.7-rc3" }.
I ran "npm install nodegit" it failed on both windows7 and ios 10.10. (64bit OSes, but ny nw.js is 32bit)
It seems basically fails to build native node-webkit module.
I have installed node-gyp, nw-gyp, node-pre-gyp at the global npm directory.
I also tried to install node-gyp, nw-gyp, node-pre-gyp in my app/node_modules, but did not help.
I also tried to install nan@1.4.3, but no difference.
Below is the console.log on ios. On windows, I got the error that says binding.gyp is not found.
In file included from ../src/blame_options.cc:2:
In file included from ../node_modules/nan/nan.h:24:
In file included from /Users/bso/.nw-gyp/0.11.7-rc3/src/node.h:76:
/Users/bso/.nw-gyp/0.11.7-rc3/deps/v8/include/v8.h:596:5: error: assigning to 'v8::Object volatile' from incompatible type 'v8::Primitive *'
TYPE_CHECK(O, Primitive);
^~~~~~~~~~~~~~~~~~~~~~~~
/Users/bso/.nw-gyp/0.11.7-rc3/deps/v8/include/v8.h:167:37: note: expanded from macro 'TYPE_CHECK'
*(static_cast<T volatile_>(0)) = static_cast<S_>(0);
^ ~~~~~~~~~~~~~~~~~~
/Users/bso/.nw-gyp/0.11.7-rc3/deps/v8/include/v8.h:592:5: note: in instantiation of function template specialization 'v8::NonCopyablePersistentTraitsv8::Object::Uncompilablev8::Object' requested here
Uncompilable();
^
/Users/bso/.nw-gyp/0.11.7-rc3/deps/v8/include/v8.h:5821:6: note: in instantiation of function template specialization 'v8::NonCopyablePersistentTraitsv8::Object::Copy<v8::Object, v8::NonCopyablePersistentTraitsv8::Object >' requested here
M::Copy(that, this);
^
/Users/bso/.nw-gyp/0.11.7-rc3/deps/v8/include/v8.h:657:5: note: in instantiation of function template specialization 'v8::Persistent<v8::Object, v8::NonCopyablePersistentTraitsv8::Object >::Copy<v8::Object, v8::NonCopyablePersistentTraitsv8::Object >' requested here
Copy(that);
^
../src/blame_options.cc:191:18: note: in instantiation of member function 'v8::Persistent<v8::Object, v8::NonCopyablePersistentTraitsv8::Object >::Persistent' requested here
NanReturnValue(wrapper->newest_commit);
^
../node_modules/nan/nan.h:401:81: note: expanded from macro 'NanReturnValue'
define NanReturnValue(value) return args.GetReturnValue().Set(_NanEnsureLocal(value))
^
1 warning and 1 error generated.
make: *** [Release/obj.target/nodegit/src/blame_options.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/bso/xdk6/node_modules/nodegit/node_modules/nw-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1067:12)
gyp ERR! System Darwin 14.3.0
gyp ERR! command "node" "/Users/bso/xdk6/node_modules/nodegit/node_modules/.bin/nw-gyp" "rebuild" "--target=0.11.7-rc3"
gyp ERR! cwd /Users/bso/xdk6/node_modules/nodegit
gyp ERR! node -v v0.12.0
gyp ERR! nw-gyp -v v0.12.4
gyp ERR! not ok
]
killed: false,
code: 1,
signal: null,
cmd: '/bin/sh -c /Users/bso/xdk6/node_modules/nodegit/node_modules/.bin/nw-gyp rebuild --target=0.11.7-rc3' }
undefined
nodegit@0.3.3 postinstall /Users/bso/xdk6/node_modules/nodegit
node lifecycleScripts/clean
Activity
bso-intel commentedon May 4, 2015
Here is the console log on windows 8.1. (64bit with nw.js 32bit v0.11.7-rc3)
bso@BSO-MOBL2 /c/xdk4 (feature/bso/nodegit)
$ npm install --msvs_version=2013 --arch=ia32 --target_arch=ia32 nodegit
npm WARN package.json XDK@ No repository field.
npm WARN package.json nan@1.7.0 No README data
npm WARN package.json paths-js@0.3.0 No repository field.
|
[nodegit] Must build for node-webkit/nw.js
[nodegit] Making sure dependencies are available and native code is generated
[nodegit] Everything is ready to go, attempting compilation
[nodegit] Building native node-webkit module.
{ [Error: Command failed: C:\WINDOWS\system32\cmd.exe /s /c "c:\xdk4\node_module
s\nodegit\node_modules.bin\nw-gyp rebuild --target=0.11.7-rc3"
child_process: customFds option is deprecated, use stdio instead.
gyp ERR! build error
gyp ERR! stack Error:
C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exefailed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (c:\xdk4\node_modules\nodegit\node_mod
ules\nw-gyp\lib\build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1067
:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "c:\xdk4\node_modules\nodegit\node_modules\nw-gyp
bin\nw-gyp.js" "rebuild" "--target=0.11.7-rc3"
gyp ERR! cwd c:\xdk4\node_modules\nodegit
gyp ERR! node -v v0.12.0
gyp ERR! nw-gyp -v v0.12.4
gyp ERR! not ok
]
killed: false,
code: 1,
signal: null,
cmd: 'C:\WINDOWS\system32\cmd.exe /s /c "c:\xdk4\node_modules\nodegit\n
ode_modules.bin\nw-gyp rebuild --target=0.11.7-rc3"' }
undefined
bso-intel commentedon May 4, 2015
On iOS, there is a work around hack.
I install nan@1.7.0 and nodegit@0.3.2.
This combination seems working on my mac.
I could not do this hack on windows, though.
tbranyen commentedon May 11, 2015
Closed as duplicate #519