From 310930395c9bf1577cf085b9742210bfc71bb019 Mon Sep 17 00:00:00 2001 From: Tim Krins Date: Tue, 20 Oct 2015 18:53:29 +0100 Subject: run-script: Warn if using script without install It might be helpful to remind people that they're trying to run a script before they actually run `npm install` on the package. PR-URL: https://github.com/npm/npm/pull/10043 Credit: @timkrins --- doc/cli/npm-run-script.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/cli/npm-run-script.md b/doc/cli/npm-run-script.md index 1e956adcc..b8da1f09f 100644 --- a/doc/cli/npm-run-script.md +++ b/doc/cli/npm-run-script.md @@ -40,6 +40,9 @@ you should write: instead of `"scripts": {"test": "node_modules/.bin/tap test/\*.js"}` to run your tests. +If you try to run a script without having a `node_modules` directory and it fails, +you will be given a warning to run `npm install`, just in case you've forgotten. + ## SEE ALSO * npm-scripts(7) -- cgit v1.2.3