Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Don't force npm to use "node install.js" #103

Closed
wants to merge 1 commit into from

2 participants

Adrian Enuta Balzac Einar Otto Stangvik
Adrian Enuta Balzac

This is for systems that have "nodejs" as a command and not "node"

Einar Otto Stangvik
Owner

I don't see this happening. The nodejs command is a problem with the package manager, not node.js nor ws.

If anything, npm should be updated to enable launching install scripts with a placeholder / variable which refers to the node executable used to launch npm in the first place.

Adrian Enuta Balzac

When I run npm install socket.io, npm complains,

ws@0.4.21 install node_modules/socket.io/node_modules/socket.io-client/node_modules/ws
node install.js

sh: node: command not found

Seems like when I try to install socket.io and then it tries to install ws, it strictly runs "node" instead of the node binary on the system.

When I do npm config list, it lists the node bin location correctly.

By default, when "install" is not defined in "scripts" in package.json, npm knows to run nodejs, so would you say it is better not to specify this?

Einar Otto Stangvik
Owner

@abalzac, when "install" isn't defined in package.json, the install script isn't run .. So no, I don't find that a better option.

Again, though, this really is an issue with the package manager who deploys node as nodejs, but I don't believe there is a crossplatform fix to be made outside of npm itself.

Einar Otto Stangvik einaros closed this
Einar Otto Stangvik
Owner

I've opened a pullreq for npm, which would fix this. In the mean time, I'm guessing you're using CentOS or similar? The package manager you used to install node also has another package to setup correct symlinks; consider installing that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 22, 2012
  1. Adrian Enuta Balzac

    Don't force npm to use node install.js on systems where nodejs comman…

    abalzac authored
    …d exists and node command does not exist
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 2 deletions.
  1. +1 −2  package.json
3  package.json
View
@@ -11,8 +11,7 @@
"wscat": "./bin/wscat"
},
"scripts": {
- "test": "make test",
- "install": "node install.js"
+ "test": "make test"
},
"engines": {
"node": ">=0.4.0"
Something went wrong with that request. Please try again.