'module' object has no attribute 'script_main'
See original GitHub issueall 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+
Issue Analytics
- State:
- Created 10 years ago
- Comments:46 (7 by maintainers)
Top Results From Across the Web
AttributeError: 'module' object has no attribute - Stack Overflow
E.g. I had a module called commands which is also a Python library module. This proved to be difficult to track down as...
Read more >AttributeError: 'module' object has no attribute 'inf_get_min_ea ...
I've tried many versions of ida pro, but I still can't import the script. Here is the error message.: \go_entry.py: 'module' object has...
Read more >[Solved] AttributeError: 'module' object has no attribute
Click here to subscribe - https://www.youtube.com/channel/UCeVMnSShP_Iviwkknt83cww▻Instagram ...
Read more >'module' object has no attribute in 3minutes - YouTube
"AttributeError: object has no attribute "Understand how to trouble shoot the error message. Examples used in the video:When you append a ...
Read more >AttributeError: 'module' object has no attribute 'main'
Module object has no attribute error: Python. An attribute in Python means some property that is associated with a particular type of object...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
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