fatal error: nan.h: No such file or directory
I need help. I'm trying to install a fresh copy of nodebb and I'm getting this error:
I've done the same procedure last week and the installation worked fine.
make: Entering directory
/root/nodebb/node_modules/utf-8-validate/build' CXX(target) Release/obj.target/validation/src/validation.o ../src/validation.cc:15:17: fatal error: nan.h: No such file or directory #include "nan.h" ^ compilation terminated. make: *** [Release/obj.target/validation/src/validation.o] Error 1 make: Leaving directory/root/nodebb/node_modules/utf-8-validate/build'
gyp ERR! build error
gyp ERR! stack Error:
makefailed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270: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 Linux 3.13.0-71-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/nodebb/node_modules/utf-8-validate
gyp ERR! node -v v4.2.3
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
Thanks in advance
We don't have a module dependency for
utf-8-validate, please remove it and try again...
Thanks you Julian,
It worked. I deleted utf-8-validate and bufferutil section from npm-shrinkwrap.json and after
npm install --production, everithing gone well.
Thanks @feio -- are you on v0.9.x branch? Interesting that it's in
npm-shrinkwrap.json... I hope nobody else gets this error...!
@julian yes, I'm using version 0.9.3.
I got the same error when I pulled the last tag, however when I switched to the master branch the error disapeared.
I am having this error, when trying to update my Dockerfile to use the v0.9.x branch. I will try the master.
I submitted the changes suggested by @feio in a PR, because I couldn't progress in updating my docker container to 0.9.x without them.
Thanks @fbmac -- really weird that those were added to the shrinkwrap file. I did publish it in Node v5, so perhaps that is why?
I had this same problem after upgrading from 0.9.1 to 0.9.3 (running Node 4.2.2), ended up resolving by removing that
@tednology Hm, I don't see that module defined in v0.9.x's