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

'module' object has no attribute 'script_main' #363

Closed
tj opened this Issue Dec 7, 2013 · 46 comments

Comments

Projects
None yet
@tj

tj commented Dec 7, 2013

all the addons are exploding for some reason:

> bcrypt@0.7.7 install /home/ubuntu/projects/api/node_modules/bcrypt
> node-gyp rebuild

Traceback (most recent call last):
  File "/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 18, in <module>
    sys.exit(gyp.script_main())
AttributeError: 'module' object has no attribute 'script_main'
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:337:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 3.11.0-12-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/ubuntu/projects/api/node_modules/bcrypt
gyp ERR! node -v v0.10.22
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok 
npm ERR! bcrypt@0.7.7 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the bcrypt@0.7.7 install script.
npm ERR! This is most likely a problem with the bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:

version info:

node-gyp@0.12.1  /usr/local/lib/node_modules/node-gyp
node@0.10.22
python 2.7.5+
@TooTallNate

This comment has been minimized.

Show comment
Hide comment
@TooTallNate

TooTallNate Dec 7, 2013

Contributor

Hmmm, I haven't seen this. Seems like a borked gyp install somehow. Perhaps try re-installing?

Contributor

TooTallNate commented Dec 7, 2013

Hmmm, I haven't seen this. Seems like a borked gyp install somehow. Perhaps try re-installing?

@rex

This comment has been minimized.

Show comment
Hide comment
@rex

rex Dec 8, 2013

I can confirm that this is a valid error, and we've tried reinstalling multiple times. Here is our log, running on an Amazon cloud instance:

[root@tools ds]# npm install bcrypt
npm WARN package.json expect.js@0.2.0 No repository field.
info trying registry request attempt 1 at 19:10:26
http GET https://registry.npmjs.org/bcrypt/0.7.4
http 304 https://registry.npmjs.org/bcrypt/0.7.4
info trying registry request attempt 1 at 19:10:27
http GET https://registry.npmjs.org/bindings/1.0.0
http 304 https://registry.npmjs.org/bindings/1.0.0

> bcrypt@0.7.4 install /some/folder/node_modules/bcrypt
> node-gyp rebuild

Traceback (most recent call last):
  File "/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 18, in <module>
    sys.exit(gyp.script_main())
AttributeError: 'module' object has no attribute 'script_main'
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:337:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 3.4.62-53.42.amzn1.x86_64
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /some/folder/node_modules/bcrypt
gyp ERR! node -v v0.10.21
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok
npm ERR! bcrypt@0.7.4 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt@0.7.4 install script.
npm ERR! This is most likely a problem with the bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls bcrypt
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.4.62-53.42.amzn1.x86_64
npm ERR! command "node" "/usr/bin/npm" "install" "bcrypt"
npm ERR! cwd /some/folder
npm ERR! node -v v0.10.21
npm ERR! npm -v 1.3.15
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /some/folder/npm-debug.log
npm ERR! not ok code 0

Any ideas? :-/

rex commented Dec 8, 2013

I can confirm that this is a valid error, and we've tried reinstalling multiple times. Here is our log, running on an Amazon cloud instance:

[root@tools ds]# npm install bcrypt
npm WARN package.json expect.js@0.2.0 No repository field.
info trying registry request attempt 1 at 19:10:26
http GET https://registry.npmjs.org/bcrypt/0.7.4
http 304 https://registry.npmjs.org/bcrypt/0.7.4
info trying registry request attempt 1 at 19:10:27
http GET https://registry.npmjs.org/bindings/1.0.0
http 304 https://registry.npmjs.org/bindings/1.0.0

> bcrypt@0.7.4 install /some/folder/node_modules/bcrypt
> node-gyp rebuild

Traceback (most recent call last):
  File "/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 18, in <module>
    sys.exit(gyp.script_main())
AttributeError: 'module' object has no attribute 'script_main'
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:337:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 3.4.62-53.42.amzn1.x86_64
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /some/folder/node_modules/bcrypt
gyp ERR! node -v v0.10.21
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok
npm ERR! bcrypt@0.7.4 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt@0.7.4 install script.
npm ERR! This is most likely a problem with the bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls bcrypt
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.4.62-53.42.amzn1.x86_64
npm ERR! command "node" "/usr/bin/npm" "install" "bcrypt"
npm ERR! cwd /some/folder
npm ERR! node -v v0.10.21
npm ERR! npm -v 1.3.15
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /some/folder/npm-debug.log
npm ERR! not ok code 0

Any ideas? :-/

@tj

This comment has been minimized.

Show comment
Hide comment
@tj

tj Dec 8, 2013

probably just a funky package manager install, I'll try from source or sth tomorrow

tj commented Dec 8, 2013

probably just a funky package manager install, I'll try from source or sth tomorrow

@TooTallNate

This comment has been minimized.

Show comment
Hide comment
@TooTallNate

TooTallNate Dec 8, 2013

Contributor

@visionmedia Is this using the debian nodejs package or something?

Contributor

TooTallNate commented Dec 8, 2013

@visionmedia Is this using the debian nodejs package or something?

@rex

This comment has been minimized.

Show comment
Hide comment
@rex

rex Dec 9, 2013

@TooTallNate I'm sorry to keep intruding, but I just wanted to point out that the error I posted was generated by a server using Yum's EPEL package manager on a RedHat-based Amazon image, installed using yum install nodejs. Attempts to use the npm version of node-gyp were fruitless, as I believe that the yum-installed node-gyp is used by default. It is weird, though, because our other servers haven't had any issues with it. To be honest, we're not utilizing dependency version locking nearly as well as we should be (npm shrinkwrap et al), so this could very easily be a breaking change in the API of any one of those dependencies.

That last part is purely speculation, of course, and not very helpful, but I wanted to provide as much feedback as possible.

Edit: I am not sure how much it helps, if at all, but I noticed something weird when running npm -g list:

npm ERR! invalid: inherits@2.0.0 /usr/lib/node_modules/inherits@2
npm ERR! not ok code 0

Subsequent attempts to npm -g update were not helpful. Though now that I'm thinking about it, I am not sure when last we cleared the npm cache. I'm going to try that and see what happens.

Edit 2: Nope, npm cache clean didn't help. Even ran npm -g install inherits and it didn't fix the dependency bug. I am now completely in agreement with @visionmedia on this one, it seems to be a dependency bug somewhere. @TooTallNate if you need more info about the machine that created this error or anything else, please let me know so I can help get this resolved. :)

Edit 3: For what it's worth, the server in question is running Python version 2.6.8.

rex commented Dec 9, 2013

@TooTallNate I'm sorry to keep intruding, but I just wanted to point out that the error I posted was generated by a server using Yum's EPEL package manager on a RedHat-based Amazon image, installed using yum install nodejs. Attempts to use the npm version of node-gyp were fruitless, as I believe that the yum-installed node-gyp is used by default. It is weird, though, because our other servers haven't had any issues with it. To be honest, we're not utilizing dependency version locking nearly as well as we should be (npm shrinkwrap et al), so this could very easily be a breaking change in the API of any one of those dependencies.

That last part is purely speculation, of course, and not very helpful, but I wanted to provide as much feedback as possible.

Edit: I am not sure how much it helps, if at all, but I noticed something weird when running npm -g list:

npm ERR! invalid: inherits@2.0.0 /usr/lib/node_modules/inherits@2
npm ERR! not ok code 0

Subsequent attempts to npm -g update were not helpful. Though now that I'm thinking about it, I am not sure when last we cleared the npm cache. I'm going to try that and see what happens.

Edit 2: Nope, npm cache clean didn't help. Even ran npm -g install inherits and it didn't fix the dependency bug. I am now completely in agreement with @visionmedia on this one, it seems to be a dependency bug somewhere. @TooTallNate if you need more info about the machine that created this error or anything else, please let me know so I can help get this resolved. :)

Edit 3: For what it's worth, the server in question is running Python version 2.6.8.

@dready92

This comment has been minimized.

Show comment
Hide comment
@dready92

dready92 Dec 9, 2013

Hello,

I got the exact same error trying to install libxmljs 0.8.1, on node 0.10.22 and python 2.7 on ubuntu 13.10.

~/.npm/libxmljs/0.8.1/package$ make
node-gyp configure
gyp info it worked if it ends with ok
gyp info using node-gyp@0.12.1
gyp info using node@0.10.22 | linux | x64
gyp info spawn python
gyp info spawn args [ '/home/mbailly/Documents/perso/node-0.10.22/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/home/mbailly/.npm/libxmljs/0.8.1/package/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/mbailly/Documents/perso/node-0.10.22/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/mbailly/.node-gyp/0.10.22/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/mbailly/.node-gyp/0.10.22',
gyp info spawn args   '-Dmodule_root_dir=/home/mbailly/.npm/libxmljs/0.8.1/package',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
Traceback (most recent call last):
  File "/home/mbailly/Documents/perso/node-0.10.22/lib/node_modules/node-gyp/gyp/gyp_main.py", line 18, in <module>
    sys.exit(gyp.script_main())
AttributeError: 'module' object has no attribute 'script_main'
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/home/mbailly/Documents/perso/node-0.10.22/lib/node_modules/node-gyp/lib/configure.js:337:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 3.11.0-13-generic
gyp ERR! command "node" "/home/mbailly/Documents/perso/node/bin/node-gyp" "configure"
gyp ERR! cwd /home/mbailly/.npm/libxmljs/0.8.1/package
gyp ERR! node -v v0.10.22
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok 
make: *** [build] Erreur 1

Please help !

dready92 commented Dec 9, 2013

Hello,

I got the exact same error trying to install libxmljs 0.8.1, on node 0.10.22 and python 2.7 on ubuntu 13.10.

~/.npm/libxmljs/0.8.1/package$ make
node-gyp configure
gyp info it worked if it ends with ok
gyp info using node-gyp@0.12.1
gyp info using node@0.10.22 | linux | x64
gyp info spawn python
gyp info spawn args [ '/home/mbailly/Documents/perso/node-0.10.22/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/home/mbailly/.npm/libxmljs/0.8.1/package/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/mbailly/Documents/perso/node-0.10.22/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/mbailly/.node-gyp/0.10.22/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/mbailly/.node-gyp/0.10.22',
gyp info spawn args   '-Dmodule_root_dir=/home/mbailly/.npm/libxmljs/0.8.1/package',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
Traceback (most recent call last):
  File "/home/mbailly/Documents/perso/node-0.10.22/lib/node_modules/node-gyp/gyp/gyp_main.py", line 18, in <module>
    sys.exit(gyp.script_main())
AttributeError: 'module' object has no attribute 'script_main'
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/home/mbailly/Documents/perso/node-0.10.22/lib/node_modules/node-gyp/lib/configure.js:337:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 3.11.0-13-generic
gyp ERR! command "node" "/home/mbailly/Documents/perso/node/bin/node-gyp" "configure"
gyp ERR! cwd /home/mbailly/.npm/libxmljs/0.8.1/package
gyp ERR! node -v v0.10.22
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok 
make: *** [build] Erreur 1

Please help !

@tj

This comment has been minimized.

Show comment
Hide comment
@tj

tj Dec 9, 2013

yeah the package manager ones seem pretty borked

tj commented Dec 9, 2013

yeah the package manager ones seem pretty borked

@tj

This comment has been minimized.

Show comment
Hide comment
@tj

tj Dec 9, 2013

yup re-install worked for me, so I guess just don't ever use the package managers haha

tj commented Dec 9, 2013

yup re-install worked for me, so I guess just don't ever use the package managers haha

@tj tj closed this Dec 9, 2013

@laithshadeed

This comment has been minimized.

Show comment
Hide comment
@laithshadeed

laithshadeed Dec 14, 2013

For me it got fixed by replacing python2.7 by python2.6. As per https://code.google.com/p/gyp/source/browse/trunk/DEPS#19 , it seems that gyp depends on python 2.6

On Ubuntu Saucy:
sudo add-apt-repository ppa:fkrull/deadsnakes
sudo apt-get update
sudo apt-get install python2.6
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.6 20
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 10

you can switch between 2.6 & 2.7 using:
sudo update-alternatives --config python

Btw I installed node using ppa:chris-lea/node.js

I hope this helps somebody.

laithshadeed commented Dec 14, 2013

For me it got fixed by replacing python2.7 by python2.6. As per https://code.google.com/p/gyp/source/browse/trunk/DEPS#19 , it seems that gyp depends on python 2.6

On Ubuntu Saucy:
sudo add-apt-repository ppa:fkrull/deadsnakes
sudo apt-get update
sudo apt-get install python2.6
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.6 20
sudo update-alternatives --install /usr/bin/python python /usr/bin/python2.7 10

you can switch between 2.6 & 2.7 using:
sudo update-alternatives --config python

Btw I installed node using ppa:chris-lea/node.js

I hope this helps somebody.

@Lujaw

This comment has been minimized.

Show comment
Hide comment
@Lujaw

Lujaw Dec 25, 2013

@laithshadeed Thanks, it solved the issue for me..

Lujaw commented Dec 25, 2013

@laithshadeed Thanks, it solved the issue for me..

@scottkellie

This comment has been minimized.

Show comment
Hide comment
@scottkellie

scottkellie Jan 3, 2014

@laithshadeed Also repaired my build on Linux mint 16 :) Thanks was driving me crazy!

scottkellie commented Jan 3, 2014

@laithshadeed Also repaired my build on Linux mint 16 :) Thanks was driving me crazy!

@springmeyer

This comment has been minimized.

Show comment
Hide comment
@springmeyer

springmeyer Jan 14, 2014

Contributor

Also just hit this on windows: in my case it was because I had a globally installed gyp version which was conflicting with the one inside node-gyp. I found my global install with python -c 'import gyp; print gyp.__file__' and removing it fixed the problem.

Contributor

springmeyer commented Jan 14, 2014

Also just hit this on windows: in my case it was because I had a globally installed gyp version which was conflicting with the one inside node-gyp. I found my global install with python -c 'import gyp; print gyp.__file__' and removing it fixed the problem.

@matzoe

This comment has been minimized.

Show comment
Hide comment
@matzoe

matzoe Jan 15, 2014

@springmeyer same to me. I just removed gyp to solve this problem.

matzoe commented Jan 15, 2014

@springmeyer same to me. I just removed gyp to solve this problem.

@walidsynclio

This comment has been minimized.

Show comment
Hide comment
@walidsynclio

walidsynclio Jan 17, 2014

I have installed node using sudo apt-get install nodejs
suso apt-get install libexpat1-dev
sudo npm install node-expat

Same Issue

root@abul-VirtualBox:~/node-xmpp-bosh# sudo npm install node-expat
npm WARN package.json eventpipe@0.0.5 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
npm WARN package.json jsdom@0.2.19 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
npm WARN package.json node-lumberjack@0.0.4 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
npm http GET https://registry.npmjs.org/node-expat
npm http 304 https://registry.npmjs.org/node-expat

> node-expat@2.0.0 install /root/node-xmpp-bosh/node_modules/node-expat
> node-gyp rebuild

Traceback (most recent call last):
  File "/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 18, in <module>
    sys.exit(gyp.script_main())
AttributeError: 'module' object has no attribute 'script_main'
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:337:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 3.5.0-17-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/node-xmpp-bosh/node_modules/node-expat
gyp ERR! node -v v0.10.24
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok 
npm ERR! node-expat@2.0.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-expat@2.0.0 install script.
npm ERR! This is most likely a problem with the node-expat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls node-expat
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.5.0-17-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "node-expat"
npm ERR! cwd /root/node-xmpp-bosh
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /root/node-xmpp-bosh/npm-debug.log
npm ERR! not ok code 0

walidsynclio commented Jan 17, 2014

I have installed node using sudo apt-get install nodejs
suso apt-get install libexpat1-dev
sudo npm install node-expat

Same Issue

root@abul-VirtualBox:~/node-xmpp-bosh# sudo npm install node-expat
npm WARN package.json eventpipe@0.0.5 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
npm WARN package.json jsdom@0.2.19 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
npm WARN package.json node-lumberjack@0.0.4 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
npm http GET https://registry.npmjs.org/node-expat
npm http 304 https://registry.npmjs.org/node-expat

> node-expat@2.0.0 install /root/node-xmpp-bosh/node_modules/node-expat
> node-gyp rebuild

Traceback (most recent call last):
  File "/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 18, in <module>
    sys.exit(gyp.script_main())
AttributeError: 'module' object has no attribute 'script_main'
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:337:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 3.5.0-17-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/node-xmpp-bosh/node_modules/node-expat
gyp ERR! node -v v0.10.24
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok 
npm ERR! node-expat@2.0.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-expat@2.0.0 install script.
npm ERR! This is most likely a problem with the node-expat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls node-expat
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.5.0-17-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "node-expat"
npm ERR! cwd /root/node-xmpp-bosh
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /root/node-xmpp-bosh/npm-debug.log
npm ERR! not ok code 0
@lloydwatkin

This comment has been minimized.

Show comment
Hide comment
@lloydwatkin

lloydwatkin Jan 17, 2014

Using node-gyp@0.11.X on a fresh ubuntu 13.10 install works just fine (at least for node-expat).

lloydwatkin commented Jan 17, 2014

Using node-gyp@0.11.X on a fresh ubuntu 13.10 install works just fine (at least for node-expat).

@tellnes

This comment has been minimized.

Show comment
Hide comment
@tellnes

tellnes Jan 20, 2014

Member

I'm seeing the same error. Downgrading to Python 2.6.x fixed it. @laithshadeed Thanks.

Member

tellnes commented Jan 20, 2014

I'm seeing the same error. Downgrading to Python 2.6.x fixed it. @laithshadeed Thanks.

@loque1

This comment has been minimized.

Show comment
Hide comment
@loque1

loque1 Jan 23, 2014

This might occur on Ubuntu based systems if you have installed gyp i.e. sudo apt-get install gyp
Try removing it then trying npm install again

loque1 commented Jan 23, 2014

This might occur on Ubuntu based systems if you have installed gyp i.e. sudo apt-get install gyp
Try removing it then trying npm install again

@kbjr

This comment has been minimized.

Show comment
Hide comment
@kbjr

kbjr Jan 23, 2014

I was originally getting the error above, but changed to python 2.6 as suggested, and now I'm getting this different error:

$ npm install
npm WARN package.json vows@0.5.11 No repository field.
npm http GET https://registry.npmjs.org/bcrypt/0.7.3
npm http 304 https://registry.npmjs.org/bcrypt/0.7.3
npm http GET https://registry.npmjs.org/bindings/1.0.0
npm http 304 https://registry.npmjs.org/bindings/1.0.0

> bcrypt@0.7.3 install /home/james/Projects/Greatvines/cube/node_modules/bcrypt
> node-gyp rebuild

make: Entering directory `/home/james/Projects/Greatvines/cube/node_modules/bcrypt/build'
  CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
../src/bcrypt_node.cc: In function ‘v8::Handle<v8::Value> {anonymous}::GenerateSalt(const v8::Arguments&)’:
../src/bcrypt_node.cc:257:74: error: invalid conversion from ‘void (*)(uv_work_t*) {aka void (*)(uv_work_s*)}’ to ‘uv_after_work_cb {aka void (*)(uv_work_s*, int)}’ [-fpermissive]
     uv_queue_work(uv_default_loop(), req, GenSaltAsync, GenSaltAsyncAfter);
                                                                          ^
In file included from /home/james/.node-gyp/0.10.24/src/node.h:61:0,
                 from ../src/bcrypt_node.cc:31:
/home/james/.node-gyp/0.10.24/deps/uv/include/uv.h:1432:15: error:   initializing argument 4 of ‘int uv_queue_work(uv_loop_t*, uv_work_t*, uv_work_cb, uv_after_work_cb)’ [-fpermissive]
 UV_EXTERN int uv_queue_work(uv_loop_t* loop, uv_work_t* req,
               ^
../src/bcrypt_node.cc: In function ‘v8::Handle<v8::Value> {anonymous}::Encrypt(const v8::Arguments&)’:
../src/bcrypt_node.cc:337:74: error: invalid conversion from ‘void (*)(uv_work_t*) {aka void (*)(uv_work_s*)}’ to ‘uv_after_work_cb {aka void (*)(uv_work_s*, int)}’ [-fpermissive]
     uv_queue_work(uv_default_loop(), req, EncryptAsync, EncryptAsyncAfter);
                                                                          ^
In file included from /home/james/.node-gyp/0.10.24/src/node.h:61:0,
                 from ../src/bcrypt_node.cc:31:
/home/james/.node-gyp/0.10.24/deps/uv/include/uv.h:1432:15: error:   initializing argument 4 of ‘int uv_queue_work(uv_loop_t*, uv_work_t*, uv_work_cb, uv_after_work_cb)’ [-fpermissive]
 UV_EXTERN int uv_queue_work(uv_loop_t* loop, uv_work_t* req,
               ^
../src/bcrypt_node.cc: In function ‘v8::Handle<v8::Value> {anonymous}::Compare(const v8::Arguments&)’:
../src/bcrypt_node.cc:431:74: error: invalid conversion from ‘void (*)(uv_work_t*) {aka void (*)(uv_work_s*)}’ to ‘uv_after_work_cb {aka void (*)(uv_work_s*, int)}’ [-fpermissive]
     uv_queue_work(uv_default_loop(), req, CompareAsync, CompareAsyncAfter);
                                                                          ^
In file included from /home/james/.node-gyp/0.10.24/src/node.h:61:0,
                 from ../src/bcrypt_node.cc:31:
/home/james/.node-gyp/0.10.24/deps/uv/include/uv.h:1432:15: error:   initializing argument 4 of ‘int uv_queue_work(uv_loop_t*, uv_work_t*, uv_work_cb, uv_after_work_cb)’ [-fpermissive]
 UV_EXTERN int uv_queue_work(uv_loop_t* loop, uv_work_t* req,
               ^
make: *** [Release/obj.target/bcrypt_lib/src/bcrypt_node.o] Error 1
make: Leaving directory `/home/james/Projects/Greatvines/cube/node_modules/bcrypt/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 3.11.0-15-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/james/Projects/Greatvines/cube/node_modules/bcrypt
gyp ERR! node -v v0.10.24
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok 
npm ERR! bcrypt@0.7.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the bcrypt@0.7.3 install script.
npm ERR! This is most likely a problem with the bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls bcrypt
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.11.0-15-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /home/james/Projects/Greatvines/cube
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/james/Projects/Greatvines/cube/npm-debug.log
npm ERR! not ok code 0

kbjr commented Jan 23, 2014

I was originally getting the error above, but changed to python 2.6 as suggested, and now I'm getting this different error:

$ npm install
npm WARN package.json vows@0.5.11 No repository field.
npm http GET https://registry.npmjs.org/bcrypt/0.7.3
npm http 304 https://registry.npmjs.org/bcrypt/0.7.3
npm http GET https://registry.npmjs.org/bindings/1.0.0
npm http 304 https://registry.npmjs.org/bindings/1.0.0

> bcrypt@0.7.3 install /home/james/Projects/Greatvines/cube/node_modules/bcrypt
> node-gyp rebuild

make: Entering directory `/home/james/Projects/Greatvines/cube/node_modules/bcrypt/build'
  CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
  CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
../src/bcrypt_node.cc: In function ‘v8::Handle<v8::Value> {anonymous}::GenerateSalt(const v8::Arguments&)’:
../src/bcrypt_node.cc:257:74: error: invalid conversion from ‘void (*)(uv_work_t*) {aka void (*)(uv_work_s*)}’ to ‘uv_after_work_cb {aka void (*)(uv_work_s*, int)}’ [-fpermissive]
     uv_queue_work(uv_default_loop(), req, GenSaltAsync, GenSaltAsyncAfter);
                                                                          ^
In file included from /home/james/.node-gyp/0.10.24/src/node.h:61:0,
                 from ../src/bcrypt_node.cc:31:
/home/james/.node-gyp/0.10.24/deps/uv/include/uv.h:1432:15: error:   initializing argument 4 of ‘int uv_queue_work(uv_loop_t*, uv_work_t*, uv_work_cb, uv_after_work_cb)’ [-fpermissive]
 UV_EXTERN int uv_queue_work(uv_loop_t* loop, uv_work_t* req,
               ^
../src/bcrypt_node.cc: In function ‘v8::Handle<v8::Value> {anonymous}::Encrypt(const v8::Arguments&)’:
../src/bcrypt_node.cc:337:74: error: invalid conversion from ‘void (*)(uv_work_t*) {aka void (*)(uv_work_s*)}’ to ‘uv_after_work_cb {aka void (*)(uv_work_s*, int)}’ [-fpermissive]
     uv_queue_work(uv_default_loop(), req, EncryptAsync, EncryptAsyncAfter);
                                                                          ^
In file included from /home/james/.node-gyp/0.10.24/src/node.h:61:0,
                 from ../src/bcrypt_node.cc:31:
/home/james/.node-gyp/0.10.24/deps/uv/include/uv.h:1432:15: error:   initializing argument 4 of ‘int uv_queue_work(uv_loop_t*, uv_work_t*, uv_work_cb, uv_after_work_cb)’ [-fpermissive]
 UV_EXTERN int uv_queue_work(uv_loop_t* loop, uv_work_t* req,
               ^
../src/bcrypt_node.cc: In function ‘v8::Handle<v8::Value> {anonymous}::Compare(const v8::Arguments&)’:
../src/bcrypt_node.cc:431:74: error: invalid conversion from ‘void (*)(uv_work_t*) {aka void (*)(uv_work_s*)}’ to ‘uv_after_work_cb {aka void (*)(uv_work_s*, int)}’ [-fpermissive]
     uv_queue_work(uv_default_loop(), req, CompareAsync, CompareAsyncAfter);
                                                                          ^
In file included from /home/james/.node-gyp/0.10.24/src/node.h:61:0,
                 from ../src/bcrypt_node.cc:31:
/home/james/.node-gyp/0.10.24/deps/uv/include/uv.h:1432:15: error:   initializing argument 4 of ‘int uv_queue_work(uv_loop_t*, uv_work_t*, uv_work_cb, uv_after_work_cb)’ [-fpermissive]
 UV_EXTERN int uv_queue_work(uv_loop_t* loop, uv_work_t* req,
               ^
make: *** [Release/obj.target/bcrypt_lib/src/bcrypt_node.o] Error 1
make: Leaving directory `/home/james/Projects/Greatvines/cube/node_modules/bcrypt/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 3.11.0-15-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/james/Projects/Greatvines/cube/node_modules/bcrypt
gyp ERR! node -v v0.10.24
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok 
npm ERR! bcrypt@0.7.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the bcrypt@0.7.3 install script.
npm ERR! This is most likely a problem with the bcrypt package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls bcrypt
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.11.0-15-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /home/james/Projects/Greatvines/cube
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/james/Projects/Greatvines/cube/npm-debug.log
npm ERR! not ok code 0
@rex

This comment has been minimized.

Show comment
Hide comment
@rex

rex Jan 24, 2014

Just wanted to leave specific instructions here for myself and any other lost souls that aren't sure how to fix this.

The credit for this fix goes to @springmeyer. The server I've tested this on is Centos 6.5 x64.

Find the locally installed gyp python module that is causing problems

  1. $ python -c 'import gyp; print gyp.__file__'
/usr/lib/python2.6/site-packages/gyp/__init__.pyc

Move or rename the folder so that python can't find it
2) $ mv /usr/lib/python2.6/site-packages/gyp /usr/lib/python2.6/site-packages/gyp_backup

Ensure that python can't find it
3) $ python -c 'import gyp; print gyp.__file__'

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named gyp

Good! Now try reinstalling!
4) $ npm install

npm http GET https://registry.npmjs.org/hiredis/-/hiredis-0.1.16.tgz
npm http GET https://registry.npmjs.org/redis/-/redis-0.10.0.tgz
npm http 200 https://registry.npmjs.org/hiredis/-/hiredis-0.1.16.tgz
npm http 200 https://registry.npmjs.org/redis/-/redis-0.10.0.tgz
npm http GET https://registry.npmjs.org/bindings/-/bindings-1.1.1.tgz
npm http 200 https://registry.npmjs.org/bindings/-/bindings-1.1.1.tgz

> hiredis@0.1.16 install /srv/www/prex.io/node_modules/hiredis
> node-gyp rebuild

make: Entering directory `/srv/www/prex.io/node_modules/hiredis/build'
  CC(target) Release/obj.target/hiredis/deps/hiredis/hiredis.o
  CC(target) Release/obj.target/hiredis/deps/hiredis/net.o
  CC(target) Release/obj.target/hiredis/deps/hiredis/sds.o
  CC(target) Release/obj.target/hiredis/deps/hiredis/async.o
  AR(target) Release/obj.target/deps/hiredis.a
  COPY Release/hiredis.a
  CXX(target) Release/obj.target/hiredis/src/hiredis.o
  CXX(target) Release/obj.target/hiredis/src/reader.o
  SOLINK_MODULE(target) Release/obj.target/hiredis.node
  SOLINK_MODULE(target) Release/obj.target/hiredis.node: Finished
  COPY Release/hiredis.node
make: Leaving directory `/srv/www/prex.io/node_modules/hiredis/build'
hiredis@0.1.16 node_modules/hiredis
��� bindings@1.1.1

rex commented Jan 24, 2014

Just wanted to leave specific instructions here for myself and any other lost souls that aren't sure how to fix this.

The credit for this fix goes to @springmeyer. The server I've tested this on is Centos 6.5 x64.

Find the locally installed gyp python module that is causing problems

  1. $ python -c 'import gyp; print gyp.__file__'
/usr/lib/python2.6/site-packages/gyp/__init__.pyc

Move or rename the folder so that python can't find it
2) $ mv /usr/lib/python2.6/site-packages/gyp /usr/lib/python2.6/site-packages/gyp_backup

Ensure that python can't find it
3) $ python -c 'import gyp; print gyp.__file__'

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named gyp

Good! Now try reinstalling!
4) $ npm install

npm http GET https://registry.npmjs.org/hiredis/-/hiredis-0.1.16.tgz
npm http GET https://registry.npmjs.org/redis/-/redis-0.10.0.tgz
npm http 200 https://registry.npmjs.org/hiredis/-/hiredis-0.1.16.tgz
npm http 200 https://registry.npmjs.org/redis/-/redis-0.10.0.tgz
npm http GET https://registry.npmjs.org/bindings/-/bindings-1.1.1.tgz
npm http 200 https://registry.npmjs.org/bindings/-/bindings-1.1.1.tgz

> hiredis@0.1.16 install /srv/www/prex.io/node_modules/hiredis
> node-gyp rebuild

make: Entering directory `/srv/www/prex.io/node_modules/hiredis/build'
  CC(target) Release/obj.target/hiredis/deps/hiredis/hiredis.o
  CC(target) Release/obj.target/hiredis/deps/hiredis/net.o
  CC(target) Release/obj.target/hiredis/deps/hiredis/sds.o
  CC(target) Release/obj.target/hiredis/deps/hiredis/async.o
  AR(target) Release/obj.target/deps/hiredis.a
  COPY Release/hiredis.a
  CXX(target) Release/obj.target/hiredis/src/hiredis.o
  CXX(target) Release/obj.target/hiredis/src/reader.o
  SOLINK_MODULE(target) Release/obj.target/hiredis.node
  SOLINK_MODULE(target) Release/obj.target/hiredis.node: Finished
  COPY Release/hiredis.node
make: Leaving directory `/srv/www/prex.io/node_modules/hiredis/build'
hiredis@0.1.16 node_modules/hiredis
��� bindings@1.1.1
@qraynaud

This comment has been minimized.

Show comment
Hide comment
@qraynaud

qraynaud Feb 9, 2014

@rex: Thanks a lot, it did the trick for me!

qraynaud commented Feb 9, 2014

@rex: Thanks a lot, it did the trick for me!

@rex

This comment has been minimized.

Show comment
Hide comment
@rex

rex Feb 10, 2014

@qraynaud Awesome, that's good news! It would probably be helpful for future wanderers if you posted the architecture/Python version you are running just to confirm that the fix works on that configuration.

rex commented Feb 10, 2014

@qraynaud Awesome, that's good news! It would probably be helpful for future wanderers if you posted the architecture/Python version you are running just to confirm that the fix works on that configuration.

@qraynaud

This comment has been minimized.

Show comment
Hide comment
@qraynaud

qraynaud Feb 10, 2014

@rex: Oh right, I'm on Ubuntu 13.10, amd64 and using python2.7.

qraynaud commented Feb 10, 2014

@rex: Oh right, I'm on Ubuntu 13.10, amd64 and using python2.7.

@sheershoff

This comment has been minimized.

Show comment
Hide comment
@sheershoff

sheershoff Feb 12, 2014

@rex ubuntu 13.10 x64, trying npm install node-expat. Your solution gave me a hint to just remove the gyp: sudo apt-get remove gyp and this helped, thanks.

sheershoff commented Feb 12, 2014

@rex ubuntu 13.10 x64, trying npm install node-expat. Your solution gave me a hint to just remove the gyp: sudo apt-get remove gyp and this helped, thanks.

@rex

This comment has been minimized.

Show comment
Hide comment
@rex

rex Feb 12, 2014

@sheershoff I'm glad it helped! And I wish it was my solution, but I just elaborated on @springmeyer's excellent solution.

rex commented Feb 12, 2014

@sheershoff I'm glad it helped! And I wish it was my solution, but I just elaborated on @springmeyer's excellent solution.

@ufuchs

This comment has been minimized.

Show comment
Hide comment
@ufuchs

ufuchs Feb 14, 2014

Many thanks! It works also on Ubuntu 12.04 LTS, amd64 and Python 2.7.3 trying 'mongodb'

ufuchs commented Feb 14, 2014

Many thanks! It works also on Ubuntu 12.04 LTS, amd64 and Python 2.7.3 trying 'mongodb'

@ghaiklor

This comment has been minimized.

Show comment
Hide comment
@ghaiklor

ghaiklor Feb 17, 2014

Member

@rex Thanks, your solution help me 👍
Korora 20, python 2.7. Removing gyp's folder from python helps.

Member

ghaiklor commented Feb 17, 2014

@rex Thanks, your solution help me 👍
Korora 20, python 2.7. Removing gyp's folder from python helps.

@Gawen

This comment has been minimized.

Show comment
Hide comment
@Gawen

Gawen May 19, 2014

sudo apt-get remove gyp also worked for me on Linux 13.04 Python2.7. Thanks!

Gawen commented May 19, 2014

sudo apt-get remove gyp also worked for me on Linux 13.04 Python2.7. Thanks!

@JonathanPorta

This comment has been minimized.

Show comment
Hide comment
@JonathanPorta

JonathanPorta May 19, 2014

Renaming the python gyp module worked for me on my local machine. I am trying to deploy an app on Heroku, and running into the same problem. Unfortunately, I can't reach into Heroku's python modules, as far as I know. Has anyone ran into this, or have any suggestions?

JonathanPorta commented May 19, 2014

Renaming the python gyp module worked for me on my local machine. I am trying to deploy an app on Heroku, and running into the same problem. Unfortunately, I can't reach into Heroku's python modules, as far as I know. Has anyone ran into this, or have any suggestions?

@TooTallNate

This comment has been minimized.

Show comment
Hide comment
@TooTallNate

TooTallNate May 19, 2014

Contributor

Note that this should be fixed permanently (i.e. node-gyp will prefer its internal copy of gyp over a global one from a package manager) in node-gyp v0.13.1 due to 52e8d9f.

Contributor

TooTallNate commented May 19, 2014

Note that this should be fixed permanently (i.e. node-gyp will prefer its internal copy of gyp over a global one from a package manager) in node-gyp v0.13.1 due to 52e8d9f.

@carbohydrate

This comment has been minimized.

Show comment
Hide comment
@carbohydrate

carbohydrate May 31, 2014

For future wonders, I was able to get atom to build on Fedora 20 by using what rex posted here. #363 (comment)
python 2.7
node -v 0.10.26
npm -v 1.4.4
I was running into problems building and installing spell-check0.35.0

carbohydrate commented May 31, 2014

For future wonders, I was able to get atom to build on Fedora 20 by using what rex posted here. #363 (comment)
python 2.7
node -v 0.10.26
npm -v 1.4.4
I was running into problems building and installing spell-check0.35.0

@gdclarke

This comment has been minimized.

Show comment
Hide comment
@gdclarke

gdclarke Jun 5, 2014

this worked for me on Ubuntu 13.10 ...

as suggested by @sheershoff sudo apt-get remove gyp

gdclarke commented Jun 5, 2014

this worked for me on Ubuntu 13.10 ...

as suggested by @sheershoff sudo apt-get remove gyp

@hapees

This comment has been minimized.

Show comment
Hide comment
@hapees

hapees Jun 10, 2014

on Fedora 20:
yum remove gyp
did the job - thank you

hapees commented Jun 10, 2014

on Fedora 20:
yum remove gyp
did the job - thank you

@davidlanger

This comment has been minimized.

Show comment
Hide comment
@davidlanger

davidlanger Apr 16, 2015

Just had the same issue on an Amazon Elastic Beanstalk Instance (64bit Amazon Linux 2014.03 v1.1.0 running Node.js). Had installed globally via sudo yum install nodejs npm --enablerepo=epel as I needed bunyan to view logs. This borked up my deployments with the same error (AttributeError: 'module' object has no attribute 'script_main').

Solved by running sudo yum remove gyp.noarch. Thanks guys!

Beforehands, I tried to remove node via sudo yum remove nodejs npm --enablerepo=epel but this did not remove the gyp installation which affected the build.

davidlanger commented Apr 16, 2015

Just had the same issue on an Amazon Elastic Beanstalk Instance (64bit Amazon Linux 2014.03 v1.1.0 running Node.js). Had installed globally via sudo yum install nodejs npm --enablerepo=epel as I needed bunyan to view logs. This borked up my deployments with the same error (AttributeError: 'module' object has no attribute 'script_main').

Solved by running sudo yum remove gyp.noarch. Thanks guys!

Beforehands, I tried to remove node via sudo yum remove nodejs npm --enablerepo=epel but this did not remove the gyp installation which affected the build.

@Jbudone

This comment has been minimized.

Show comment
Hide comment
@Jbudone

Jbudone May 2, 2015

Same problem on Amazon EC2, fixed w/ sudo npm -g install node-gyp

Jbudone commented May 2, 2015

Same problem on Amazon EC2, fixed w/ sudo npm -g install node-gyp

@darkoverlordofdata

This comment has been minimized.

Show comment
Hide comment
@darkoverlordofdata

darkoverlordofdata May 4, 2015

This worked on Mint 17, also. Thanks!!! I tried upgrading npm, node, switching py versions. It just shuffled the problem around. I thought I was going nuts. This fixed it:

sudo apt-get remove gyp

darkoverlordofdata commented May 4, 2015

This worked on Mint 17, also. Thanks!!! I tried upgrading npm, node, switching py versions. It just shuffled the problem around. I thought I was going nuts. This fixed it:

sudo apt-get remove gyp

@LogeshEswar

This comment has been minimized.

Show comment
Hide comment
@LogeshEswar

LogeshEswar Sep 8, 2015

while running codebox I got an following error Module did not self-register the i used the code node-gyp rebuild. Now its showing this error.

gyp: binding.gyp not found (cwd: /home/logesh/code/megam/workspace/codebox) 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 (/usr/share/node-gyp/lib/configure.js:344:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.19.0-15-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/logesh/code/megam/workspace/codebox
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
logesh@logesh-Aspire-E1-431:/code/megam/workspace/codebox$ node -v
v0.12.4
logesh@logesh-Aspire-E1-431:
/code/megam/workspace/codebox$ npm -v
1.4.21

LogeshEswar commented Sep 8, 2015

while running codebox I got an following error Module did not self-register the i used the code node-gyp rebuild. Now its showing this error.

gyp: binding.gyp not found (cwd: /home/logesh/code/megam/workspace/codebox) 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 (/usr/share/node-gyp/lib/configure.js:344:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.19.0-15-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/logesh/code/megam/workspace/codebox
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
logesh@logesh-Aspire-E1-431:/code/megam/workspace/codebox$ node -v
v0.12.4
logesh@logesh-Aspire-E1-431:
/code/megam/workspace/codebox$ npm -v
1.4.21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment