byteball / headless-obyte

Headless Obyte wallet
https://developer.obyte.org
MIT License
26 stars 42 forks source link

Execute the npm install to report an error #21

Closed zhouzhonghui closed 5 years ago

zhouzhonghui commented 6 years ago

hello,I execute npm install is error

\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Users\zzh\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild ) gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR internal/modules/cjs/loader.js:596 throw err; ^

Error: Cannot find module 'nan' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:594:15) at Function.Module._load (internal/modules/cjs/loader.js:520:25) at Module.require (internal/modules/cjs/loader.js:650:17) at require (internal/modules/cjs/helpers.js:20:18) at [eval]:1:1 at Script.runInThisContext (vm.js:91:20) at Object.runInThisContext (vm.js:298:38) at Object. ([eval]-wrapper:6:22) at Module._compile (internal/modules/cjs/loader.js:702:30) at evalScript (internal/bootstrap/node.js:539:27) gyp: Call to 'node -e "require('nan')"' returned exit status 1 while in binding.gyp. while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error: gyp failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (C:\Users\zzh\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\configure.js:336:16) gyp ERR! stack at ChildProcess.emit (events.js:182:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12) gyp ERR! System Windows_NT 10.0.16299 gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\zzh\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd D:\github\byteball\headless-byteball\node_modules\byteballcore\node_modules\secp256k1 gyp ERR! node -v v10.3.0 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! secp256k1@3.5.0 rebuild: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the secp256k1@3.5.0 rebuild script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\zzh\AppData\Roaming\npm-cache_logs\2018-07-04T07_43_16_355Z-debug.log "Secp256k1 bindings compilation fail. Pure JS implementation will be used."

please help me

drozd16242283 commented 5 years ago

Just try to run npm install with node version 5 or 6.

tonyofbyteball commented 5 years ago

It works fine in 10.x. Try deleting node_modules and npm install again. Building on windows is challenging but not impossible.