Skip to content


Subversion checkout URL

You can clone with
Download ZIP


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

wants to merge 1 commit into from

2 participants


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


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.


When I run npm install, npm complains,

ws@0.4.21 install node_modules/
node install.js

sh: node: command not found

Seems like when I try to install 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?


@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.

@einaros einaros closed this

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. @abalzac

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

    abalzac committed
    …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
@@ -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.