From 00e2d628471e8641c3a6bb11b16c405446a85131 Mon Sep 17 00:00:00 2001 From: isaacs Date: Thu, 28 Oct 2010 15:46:06 -0700 Subject: [PATCH] Add a helpful message for when someone does "node npm.js" --- npm.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/npm.js b/npm.js index 2fc8c15b39e..b56d19d77b3 100644 --- a/npm.js +++ b/npm.js @@ -1,6 +1,14 @@ process.title = "npm" +if (require.main === module) { + console.error(["It looks like you're doing 'node npm.js'." + ,"Don't do that. Instead, run 'make install'" + ,"and then use the 'npm' command line utility." + ].join("\n")) + process.exit(1) +} + var npm = exports , config = require("./lib/config") , set = require("./lib/utils/set")