Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade node 6.0, npm install ERROR "node-gyp rebuild" #153

Closed
why520crazy opened this issue Apr 27, 2016 · 11 comments
Closed

upgrade node 6.0, npm install ERROR "node-gyp rebuild" #153

why520crazy opened this issue Apr 27, 2016 · 11 comments

Comments

@why520crazy
Copy link

upgrade node 6.0, npm install ERROR "node-gyp rebuild"

run npm install iconv after npm install node-gyp@3.3.1 -g,
the error as

> node-gyp 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
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
  CC(target) Release/obj.target/libiconv/deps/libiconv/lib/iconv.o
./Release/.deps/Release/obj.target/libiconv/deps/libiconv/lib/iconv.o.d.raw { dev: 16777220,
  mode: 33188,
  nlink: 1,
  uid: 501,
  gid: 20,
  rdev: 0,
  blksize: 4096,
  ino: 63866192,
  size: 7111,
  blocks: 16,
  atime: 2016-04-27T05:30:06.000Z,
  mtime: 2016-04-27T05:30:06.000Z,
  ctime: 2016-04-27T05:30:06.000Z,
  birthtime: 2016-04-27T05:30:06.000Z }
  LIBTOOL-STATIC Release/iconv.a
  CXX(target) Release/obj.target/iconv/src/binding.o
In file included from ../src/binding.cc:18:
../node_modules/nan/nan.h:590:20: error: no type named 'GCEpilogueCallback' in 'v8::Isolate'
      v8::Isolate::GCEpilogueCallback callback
      ~~~~~~~~~~~~~^
../node_modules/nan/nan.h:596:20: error: no type named 'GCEpilogueCallback' in 'v8::Isolate'
      v8::Isolate::GCEpilogueCallback callback) {
      ~~~~~~~~~~~~~^
../node_modules/nan/nan.h:601:20: error: no type named 'GCPrologueCallback' in 'v8::Isolate'
      v8::Isolate::GCPrologueCallback callback
      ~~~~~~~~~~~~~^
../node_modules/nan/nan.h:607:20: error: no type named 'GCPrologueCallback' in 'v8::Isolate'
      v8::Isolate::GCPrologueCallback callback) {
      ~~~~~~~~~~~~~^
4 errors generated.
make: *** [Release/obj.target/iconv/src/binding.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/haifeng/.nvm/versions/node/v6.0.0/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:204:12)
gyp ERR! System Darwin 14.5.0
gyp ERR! command "/Users/haifeng/.nvm/versions/node/v6.0.0/bin/node" "/Users/haifeng/.nvm/versions/node/v6.0.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/haifeng/IT/10_YC/projects/wt-pro-chat/node_modules/iconv
gyp ERR! node -v v6.0.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok 
npm WARN wt-pro-chat@1.0.0 No description
npm WARN wt-pro-chat@1.0.0 No repository field.
npm ERR! Darwin 14.5.0
npm ERR! argv "/Users/haifeng/.nvm/versions/node/v6.0.0/bin/node" "/Users/haifeng/.nvm/versions/node/v6.0.0/bin/npm" "install" "iconv"
npm ERR! node v6.0.0
npm ERR! npm  v3.8.6
npm ERR! code ELIFECYCLE

@why520crazy
Copy link
Author

perfect, thanks!!!

@YkmLo
Copy link

YkmLo commented Jun 24, 2016

Hi, I am new at GitHub, so I don't understand how to read issues. I have open the link (Failed at the lame@1.2.3 install script 'node-gyp rebuild'. #62) but the people there just post "+1". I am having the same problem right now, how do I fix it?

@chrisli30
Copy link

Try npm install nan first. I had the same issue and below command solved it for me.

npm install nan@latest

nan@2.7.0 is actually installed

@andpor
Copy link

andpor commented Nov 24, 2017

So what is the resolution here? I am getting same compile errors in npm install using node 6.9.1 and 6.12.0 on OS X...

@why520crazy
Copy link
Author

I solved it now use version 2.3.0, can you try upgrade?

@andpor
Copy link

andpor commented Nov 30, 2017

@why520crazy - how did you solve this exactly - can you provide steps? npm install nan installs nan 2.8.0 but it does not fix the compilation errors in node-gyp.

@why520crazy
Copy link
Author

@andpor I do not remember the details steps, but i'm sure i did not install nan , we use "iconv": "^2.3.0" and node 6.x or 8.x now, no errors in the installation.

@why520crazy
Copy link
Author

why520crazy commented Dec 1, 2017

@andpor you can try upgrade node to version 8.9.1 or 6.12.0.

@why520crazy
Copy link
Author

@andpor try npm install after delete node_modules folder.

@raymatos
Copy link

not working on aws-linux

> node-gyp rebuild

make: Entering directory `/var/task/node_modules/iconv/build'
  CXX(target) Release/obj.target/iconv/src/binding.o
  CC(target) Release/obj.target/iconv/deps/libiconv/lib/iconv.o
  CC(target) Release/obj.target/iconv/support/localcharset.o
  SOLINK_MODULE(target) Release/obj.target/iconv.node
/usr/bin/ld: /usr/bin/ld: cannot execute binary file
collect2: error: ld returned 126 exit status
make: *** [Release/obj.target/iconv.node] Error 1
make: Leaving directory `/var/task/node_modules/iconv/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/var/lang/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.9.93-linuxkit-aufs
gyp ERR! command "/var/lang/bin/node" "/var/lang/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /var/task/node_modules/iconv
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/sane/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! iconv@2.3.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the iconv@2.3.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-08-15T04_23_02_295Z-debug.log```

@filetvignon
Copy link

Try npm install nan first. I had the same issue and below command solved it for me.

npm install nan@latest

nan@2.7.0 is actually installed

This also worked for me even after windows-build-tools failed. I have no idea why, but it did the job.

Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants