From b352a84c2c7ad15e9c669af75f65cdaa964f86c0 Mon Sep 17 00:00:00 2001 From: Max Date: Sun, 7 Aug 2016 10:16:33 +0200 Subject: doc: explain how to set node env in bin scripts Fixes: #12438 Credit: @mxstbr Reviewed-By: @zkat PR-URL: https://github.com/npm/npm/pull/13598 --- doc/files/package.json.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc') diff --git a/doc/files/package.json.md b/doc/files/package.json.md index c67dfa419..f58343604 100644 --- a/doc/files/package.json.md +++ b/doc/files/package.json.md @@ -248,6 +248,10 @@ would be the same as this: , "version": "1.2.5" , "bin" : { "my-program" : "./path/to/program" } } +Please make sure that your file(s) referenced in `bin` starts with +`#!/usr/bin/env node`, otherwise the scripts are started without the node +executable! + ## man Specify either a single file or an array of filenames to put in place for the -- cgit v1.2.3