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

NO able to install node-expat #84

Closed
walidsynclio opened this issue Jan 17, 2014 · 8 comments
Closed

NO able to install node-expat #84

walidsynclio opened this issue Jan 17, 2014 · 8 comments

Comments

@walidsynclio
Copy link

Hi,
I am not able to install node-expat.
I have used npm install node-expat and I see this:

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
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 (childprocess.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

Do I need anything else before I install node-expat

@lloydwatkin
Copy link
Contributor

Please ensure you have libexpat installed (apt-get install libexpat-dev).

Also please try version 2.1.4 of node-expat as this has fixes for latest versions of nodejs.

Let me know if there's any problem.

@lloydwatkin
Copy link
Contributor

This may be related to nodejs/node-gyp#363

Just brought up a fresh 13.10 server and getting install problems too

@walidsynclio
Copy link
Author

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
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 (childprocess.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
Copy link
Contributor

AttributeError: 'module' object has no attribute 'script_main'

Looks like you are hitting the gyp issue too, afraid there's nothing I can do until the above it fixed.

@walidsynclio
Copy link
Author

I have started with node-xmpp-bosh, got error , reported. they told report to node.
Node guys told report to node-expat. now You are saying gyp.
I am just trying to use node-xmpp-bosh. if that suff anyway works.

@lloydwatkin
Copy link
Contributor

Yeah I understand, very annoying.

I've just discovered that if you use node-gyp version 0.10.X then it'll install ok. If you can remove node-gyp from your system and install this version node-expat will install.

@walidsynclio
Copy link
Author

Thank you.
I got solved. I did not read older comments properly.
It needs a older python

Thanks agian

@lloydwatkin
Copy link
Contributor

Glad to hear it

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

No branches or pull requests

2 participants