Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in Linux by (18.4k points)

I am using the below code:

npm http 200 https://registry.npmjs.org/weak/-/weak-0.2.2.tgz

npm http GET https://registry.npmjs.org/bindings

npm http 304 https://registry.npmjs.org/bindings

> [email protected] install node_modules/weak

> 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.11.0-15-generic

gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"

gyp ERR! node -v v0.10.15

gyp ERR! node-gyp -v v0.12.1

gyp ERR! not ok 

npm ERR! [email protected] install: `node-gyp rebuild`

npm ERR! Exit status 1

npm ERR! 

npm ERR! Failed at the [email protected] install script.

npm ERR! This is most likely a problem with the weak 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 weak

npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.11.0-15-generic

npm ERR! command "node" "/usr/bin/npm" "install" "[email protected]"

npm ERR! node -v v0.10.15

npm ERR! npm -v 1.3.23

npm ERR! code ELIFECYCLE

npm ERR! not ok code 0

Since I don't have any direct dependency on weak or node-gyp but I think it is needed by my other dependencies (express,phantom,ejs,aws-sdk,moment)

1 Answer

0 votes
by (36.8k points)

Your thinking python version is the source of the error, I think you have "gyp" installed. This might conflict with your gyp version in node-gyp.

apt-get remove gyp

To know about Linux join the Linux training

 

Related questions

0 votes
1 answer
0 votes
1 answer
asked Feb 5 in Linux by blackindya (18.4k points)
0 votes
1 answer
asked Jan 20 in Linux by blackindya (18.4k points)
0 votes
1 answer
0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94.1k users

Browse Categories

...