Skip to content

'node' command fails on Ubuntu #301

Description

@triskell

The following command in binding.gyp is no more compatible with Ubuntu 13.10 with NodeJS v0.10.x (in my case)
node -e "require(\'nan\')"
I quote the warnings

/bin/sh: 1: node: not found
gyp: Call to 'node -e "require('nan')"' returned exit status 127. 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:431: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 "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/trysk/Workspace/TextDuino/node_modules/serialport
gyp ERR! node -v v0.10.15
gyp ERR! node-gyp -v v0.10.9
gyp ERR! not ok 
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

It appears that nodejs -e "require(\'nan\')" solves the problem on that platform.

Activity

  1. rvagg commented on Feb 5, 2014

    @rvagg
    Contributor

    @triskell not having a proper "node" executable on your system is going to cause you pain in a lot more places than this. Debian have gone it alone in insisting on "nodejs" over "node" due to a package dispute. There is a nodejs-legacy package but I strongly recommend you switch to using Chris Lea's PPA which is always up-to-date (within a day or two of official releases), details on the Node wiki.

  2. reconbot commented on Feb 7, 2014

    @reconbot
    Member

    @rvagg I'm with you on this one, following the advise in nodejs/nan#70 is the fix I think

  3. locked as resolved and limited conversation to collaborators on May 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions