Gyp ERR! build error


(Responsive) #1

gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 4.4.0-38-generic
gyp ERR! command “/usr/local/bin/node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” "rebuild"
gyp ERR! cwd /home/responsive/node_modules/bufferutil
gyp ERR! node -v v7.0.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok

I dont understand this at all.

I tried updating the latest version of node and i still get this error. when i google it, i dont find an answer.

node -v
v7.0.0

anyone get bitcore working?


(Responsive) #2

node-gyp rebuild

gets me.

module.js:474
throw err;
^

Error: Cannot find module 'graceful-fs’
at Function.Module._resolveFilename (module.js:472:15)
at Function.Module._load (module.js:420:25)
at Module.require (module.js:500:17)
at require (internal/module.js:20:19)
at Object. (/usr/share/node-gyp/lib/node-gyp.js:12:10)
at Module._compile (module.js:573:32)
at Object.Module._extensions…js (module.js:582:10)
at Module.load (module.js:490:32)
at tryModuleLoad (module.js:449:12)
at Function.Module._load (module.js:441:3)


(Responsive) #3

sudo npm install bitcore

npm ERR! Linux 4.4.0-38-generic
npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “install” "bitcore"
npm ERR! node v7.0.0
npm ERR! npm v3.10.9
npm ERR! path /home/responsive/Sandbox/Bitcoin/introBitcore/node_modules/bitcore-node/bin/bitcoind
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod

npm ERR! enoent ENOENT: no such file or directory, chmod '/home/responsive/Sandbox/Bitcoin/introBitcore/node_modules/bitcore-node/bin/bitcoind’
npm ERR! enoent ENOENT: no such file or directory, chmod '/home/responsive/Sandbox/Bitcoin/introBitcore/node_modules/bitcore-node/bin/bitcoind’
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! Please include the following file with any support request:
npm ERR! /home/responsive/Sandbox/Bitcoin/introBitcore/npm-debug.log


(Responsive) #4

i dont nknow what the hell i am doing. i was using bitcore before. i think i have messed up my node.


#5

I was frustrated as well I think you can only use v4 and not npm@latest
nvm install v4
I can’t remember the command but it told the os just to use v4


(Responsive) #6

do i have to remove npm and replace it with v4?


#7

no idea
here is the commands I used
sudo apt install curl
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash
nvm install v4
nvm use v4
sudo apt-get install libzmq3-dev build-essential
npm install -g bitcore-node
npm install -g bitcore-node@latest
bitcore-node create mynode
cd mynode
bitcore-node install insight-api
bitcore-node install insight-ui
bitcore-node start