node-inspector / v8-debug

v8 debugger extending API
BSD 2-Clause "Simplified" License
45 stars 21 forks source link

v8-debug doesn't install under Node 0.10.x #3

Closed aikimcr closed 10 years ago

aikimcr commented 10 years ago

I spent a little time trying to troubleshoot without much success. All other packages not dependent on this one are installing fine. The error occurs on 0.1.0, 0.1.5 and 0.2.0.

[root@argon node-inspector]# npm install v8-debug
npm http GET https://registry.npmjs.org/v8-debug
npm http 200 https://registry.npmjs.org/v8-debug
npm http GET https://registry.npmjs.org/v8-debug/-/v8-debug-0.1.5.tgz
npm http 200 https://registry.npmjs.org/v8-debug/-/v8-debug-0.1.5.tgz
npm http GET https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/nan

> v8-debug@0.1.5 install /root/svn/devtoys/node_js/node_modules/node-inspector/node_modules/v8-debug
> node-gyp rebuild

Traceback (most recent call last):
  File "/usr/bin/gyp", line 18, in <module>
    sys.exit(gyp.main(sys.argv[1:]))
  File "/usr/lib/python2.6/site-packages/gyp/__init__.py", line 462, in main
    options.circular_check)
  File "/usr/lib/python2.6/site-packages/gyp/__init__.py", line 100, in Load
    depth, generator_input_info, check, circular_check)
  File "/usr/lib/python2.6/site-packages/gyp/input.py", line 2255, in Load
    depth, check)
  File "/usr/lib/python2.6/site-packages/gyp/input.py", line 362, in LoadTargetBuildFile
    includes, True, check)
  File "/usr/lib/python2.6/site-packages/gyp/input.py", line 217, in LoadOneBuildFile
    None)
  File "binding.gyp", line 1
    {
     ^
SyntaxError: invalid syntax
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/node-gyp/lib/configure.js:428: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 2.6.32-431.29.2.el6.x86_64
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/svn/devtoys/node_js/node_modules/node-inspector/node_modules/v8-debug
gyp ERR! node -v v0.10.24
gyp ERR! node-gyp -v v0.10.6
gyp ERR! not ok
npm ERR! weird error 1
npm ERR! not ok code 0
[root@argon node-inspector]# uname -a
Linux argon.corp.airwave.com 2.6.32-431.29.2.el6.x86_64 #1 SMP Tue Sep 9 21:36:05 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
[root@argon node-inspector]# cat /etc/redhat-release 
CentOS release 6.2 (Final)
[root@argon node-inspector]# python
Python 2.7.4 (default, Apr 17 2013, 09:54:46) 
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 
[root@argon node-inspector]# 
[root@argon node-inspector]# rpm -qa | grep gyp
gyp-0.1-0.6.1010svn.el6.noarch
node-gyp-0.10.6-2.el6.noarch
[root@argon node-inspector]# 
3y3 commented 10 years ago

Can you update to python 2.7 and try again?

aikimcr commented 10 years ago

Actually, that's going to be a problem. Upgrading Python at this point is not going to be approved. That's an infrastructure change which will affect customers. It's likely to be a month or more before I'll be allowed to do that.

On Oct 4, 2014, at 2:02 AM, 3y3 wrote:

Can you updeta to python 2.7 and try again?

— Reply to this email directly or view it on GitHub.

3y3 commented 10 years ago

Have you problems with other binary packages for Node JS?

Also I see that you already have python 2.7, so problem isn't here. How about update node-gyp? (my version is 0.13.0)

aikimcr commented 10 years ago

No problems that I know of. I just tried blowing away and reinstalling all the node modules we use. None of them appear to use node-gyp, but at least one of them compiles a binary.

Upgrading node-gyp might be challenging. We are on 10.6 which is the highest version currently available for CentOS 6.2. So I tried just blowing away the node-gyp directory under /usr/lib/node_modules and doing ‘npm install -g node-gyp’. No joy, it still errors out trying install v8-debug.

On Oct 6, 2014, at 6:41 AM, 3y3 notifications@github.com wrote:

Have you problems with other binary packages for Node JS?

Also I see that you already have python 2.7, so problem isn't here. How about update node-gyp? (my version is 0.13.0)

— Reply to this email directly or view it on GitHub.

3y3 commented 10 years ago

I'm not very familiar with python, can you explain me, why python2.6 used here

File "/usr/lib/python2.6/site-packages/gyp/__init__.py", line 462, in main
    options.circular_check)

and python2.7 here

[root@argon node-inspector]# python
Python 2.7.4 (default, Apr 17 2013, 09:54:46) 

Is this expected behavior?

aikimcr commented 10 years ago

Problem solved. I talked to our Python guy here and he and I looked into node-gyp. The install must be run with the ‘PYTHON’ environment variable set to point to the correct version of Python.

So, this is Good News, really. We have a similar problem with Perl, so we have strategies to deal with it. I can honestly say this is the first time I’ve seen it with Python. But, of course, Python is a relatively new part of our system.

On Oct 6, 2014, at 1:48 PM, 3y3 notifications@github.com wrote:

I'm not very familiar with python, can you explain me, why python2.6 used here

File "/usr/lib/python2.6/site-packages/gyp/init.py", line 462, in main options.circular_check) and python2.7 here

[root@argon node-inspector]# python Python 2.7.4 (default, Apr 17 2013, 09:54:46) Is this expected behavior?

— Reply to this email directly or view it on GitHub.

hallmark commented 9 years ago

The following solution worked for me. This is how I configured node-gyp to use Python 2.7 under CentOS 6.3 (using instructions suggested by node-gyp):

npm config set python /usr/bin/python2.7