{"_id":"run-node","_rev":"88278","name":"run-node","description":"Run the Node.js binary no matter what","dist-tags":{"latest":"2.0.0"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2021-06-03T10:28:41.000Z","created":"2016-07-16T18:00:46.331Z","2.0.0":"2020-02-22T11:49:38.277Z","1.0.0":"2018-04-19T19:10:30.886Z","0.2.0":"2018-01-14T01:45:56.617Z","0.1.1":"2016-07-16T19:19:36.531Z","0.1.0":"2016-07-16T18:00:46.331Z"},"users":{"danielbayley":true},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/run-node.git"},"versions":{"2.0.0":{"name":"run-node","version":"2.0.0","description":"Run the Node.js binary no matter what","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/run-node.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"bin":{"run-node":"run-node"},"engines":{"node":">=10"},"scripts":{"test":"./run-node --version"},"keywords":["run","node","nodejs","node.js","find","binary","bin","execute","which","detect","path","env","bash","shell","sh"],"gitHead":"aadc87252498dac5a4187ab4a038e22000fd031a","bugs":{"url":"https://github.com/sindresorhus/run-node/issues"},"homepage":"https://github.com/sindresorhus/run-node#readme","_id":"run-node@2.0.0","_nodeVersion":"10.18.1","_npmVersion":"6.13.4","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"0f598db2bf1cca3cc972abdb6f48c1f40cb29317","size":2972,"noattachment":false,"key":"/run-node/-/run-node-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/run-node/download/run-node-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/run-node_2.0.0_1582372178089_0.47433207003914113"},"_hasShrinkwrap":false,"publish_time":1582372178277,"_cnpm_publish_time":1582372178277},"1.0.0":{"name":"run-node","version":"1.0.0","description":"Run the Node.js binary no matter what","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/run-node.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"bin":{"run-node":"run-node"},"engines":{"node":">=4"},"scripts":{"test":"./run-node --version"},"files":["run-node"],"keywords":["run","node","nodejs","node.js","find","binary","bin","execute","which","detect","path","env","bash","shell","sh"],"gitHead":"d14acdff68721e05c46d69d0a3ce213eaa32b3e4","bugs":{"url":"https://github.com/sindresorhus/run-node/issues"},"homepage":"https://github.com/sindresorhus/run-node#readme","_id":"run-node@1.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.10.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"46b50b946a2aa2d4947ae1d886e9856fd9cabe5e","size":2517,"noattachment":false,"key":"/run-node/-/run-node-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/run-node/download/run-node-1.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/run-node_1.0.0_1524165030735_0.10501742839010042"},"_hasShrinkwrap":false,"publish_time":1524165030886,"_cnpm_publish_time":1524165030886},"0.2.0":{"name":"run-node","version":"0.2.0","description":"Run the Node.js binary no matter what","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/run-node.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"bin":{"run-node":"run-node"},"engines":{"node":">=4"},"scripts":{"test":"./run-node --version"},"files":["run-node"],"keywords":["run","node","nodejs","node.js","find","binary","bin","execute","which","detect","path","env","bash","shell","sh"],"gitHead":"d79edd9184505233ba884f295a9f8a5b5ed2411c","bugs":{"url":"https://github.com/sindresorhus/run-node/issues"},"homepage":"https://github.com/sindresorhus/run-node#readme","_id":"run-node@0.2.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"b26e942e94205dedbe532cddf0fd1dbd56649af6","size":2523,"noattachment":false,"key":"/run-node/-/run-node-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/run-node/download/run-node-0.2.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/run-node-0.2.0.tgz_1515894356497_0.38352520461194217"},"directories":{},"publish_time":1515894356617,"_hasShrinkwrap":false,"_cnpm_publish_time":1515894356617},"0.1.1":{"name":"run-node","version":"0.1.1","description":"Run the Node.js binary no matter what","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/run-node.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"maintainers":[{"name":"sindresorhus","email":""}],"bin":{"run-node":"run-node"},"engines":{"node":">=4"},"scripts":{"test":"./run-node --version"},"files":["run-node"],"keywords":["run","node","nodejs","node.js","find","binary","bin","execute","which","detect","path","env","bash","shell","sh"],"gitHead":"b3d50446c878cc9f9c3e40e27f58a11ea1d8ca14","bugs":{"url":"https://github.com/sindresorhus/run-node/issues"},"homepage":"https://github.com/sindresorhus/run-node#readme","_id":"run-node@0.1.1","_shasum":"182ee9acd9a3b7ac5e6cf7679d5c33a1360c7b6f","_from":".","_npmVersion":"2.15.5","_nodeVersion":"4.4.5","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"182ee9acd9a3b7ac5e6cf7679d5c33a1360c7b6f","size":2379,"noattachment":false,"key":"/run-node/-/run-node-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/run-node/download/run-node-0.1.1.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/run-node-0.1.1.tgz_1468696774088_0.5987678836099803"},"directories":{},"publish_time":1468696776531,"_cnpm_publish_time":1468696776531,"_hasShrinkwrap":false},"0.1.0":{"name":"run-node","version":"0.1.0","description":"Run the Node.js binary no matter what","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/run-node.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"maintainers":[{"name":"sindresorhus","email":""}],"bin":{"run-node":"run-node"},"engines":{"node":">=4"},"scripts":{"test":"./run-node --version"},"files":["run-node"],"keywords":["run","node","nodejs","node.js","find","binary","bin","execute","which","detect","path","env","bash","shell","sh"],"gitHead":"d682fcab81c2a4f6582de2cc3f803349af4de8fd","bugs":{"url":"https://github.com/sindresorhus/run-node/issues"},"homepage":"https://github.com/sindresorhus/run-node#readme","_id":"run-node@0.1.0","_shasum":"cd64e597e4374b37c547f6a549e53322f17afa61","_from":".","_npmVersion":"2.15.5","_nodeVersion":"4.4.5","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"cd64e597e4374b37c547f6a549e53322f17afa61","size":2369,"noattachment":false,"key":"/run-node/-/run-node-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/run-node/download/run-node-0.1.0.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/run-node-0.1.0.tgz_1468692044231_0.5862267650663853"},"directories":{},"publish_time":1468692046331,"_cnpm_publish_time":1468692046331,"_hasShrinkwrap":false}},"readme":"# run-node [![Build Status](https://travis-ci.org/sindresorhus/run-node.svg?branch=master)](https://travis-ci.org/sindresorhus/run-node)\n\n> Run the Node.js binary no matter what\n\nYou can't always assume running `$ node file.js` will just work. The user might have the `node` binary in a non-standard location. They might be using a Node.js version manager like `nvm`, which is sourced in a subshell and not available from the outside. Or they might have `node` installed as a local dependency in an npm project. It also depends from where you're trying to run it. For example, GUI apps on macOS doesn't inherit the [`$PATH`](https://en.wikipedia.org/wiki/PATH_(variable)), so the `node` binary would not be found. Most projects that depend on Node.js just end up telling the user to manually set the full path to the `node` binary in some project specific settings. Now every project has to do this. [Ugh...](https://gist.github.com/cookrn/4015437) I prefer things to *just* work. With this module it will.\n\nThis Bash script uses some tricks to find the Node.js binary on your system and run it.\n\nCan be used from any environment that can spawn a process (Shell, Python, Ruby, Swift, Objective-C, etc).\n\n### npm\n\n#### Install\n\n```\n$ npm install run-node\n```\n\n#### Usage\n\n```\n$ ./node_modules/.bin/run-node file.js\n```\n\nOr in an [npm run script](https://docs.npmjs.com/cli/run-script):\n\n```json\n{\n\t\"start\": \"run-node file.js\"\n}\n```\n\nIf the [`node`](https://www.npmjs.com/package/node) package is found in the local `node_modules` directory (for instance, if you have it installed as a [devDependency](https://docs.npmjs.com/files/package.json#devdependencies) of your npm project), this is the `node` binary that will be used.\n\n### Manually\n\n#### Install\n\nDownload the [run-node](run-node) file:\n\n```\n$ curl -sSLO https://github.com/sindresorhus/run-node/raw/master/run-node && chmod +x run-node\n```\n\n#### Usage\n\n```\n./run-node file.js\n```\n\n#### Customizable cache path and error message\n\nThe cache path and error message are defined by the `RUN_NODE_CACHE_PATH` and `RUN_NODE_ERROR_MSG` environment variables. You could use them in a script or add them to your `~.bashrc`.\n\nDefault config:\n\n```sh\nexport RUN_NODE_ERROR_MSG=\"Couldn't find the Node.js binary. Ensure you have Node.js installed. Open an issue on https://github.com/sindresorhus/run-node\"\nexport RUN_NODE_CACHE_PATH=\"/home/username/.node_path\"\n```\n\nIf the `RUN_NODE_CACHE_PATH` environment variable is defined explicitly, the script it points to will be sourced before looking for a `node` binary. You can use this script to override your `PATH` variable so that a specific `node` binary is found.\n\n## Maintainers\n\n- [Sindre Sorhus](https://github.com/sindresorhus)\n- [Mathias Fredriksson](https://github.com/mafredri)\n\n---\n\n<div align=\"center\">\n\t<b>\n\t\t<a href=\"https://tidelift.com/subscription/pkg/npm-run-node?utm_source=npm-run-node&utm_medium=referral&utm_campaign=readme\">Get professional support for this package with a Tidelift subscription</a>\n\t</b>\n\t<br>\n\t<sub>\n\t\tTidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.\n\t</sub>\n</div>\n","_attachments":{},"homepage":"https://github.com/sindresorhus/run-node#readme","bugs":{"url":"https://github.com/sindresorhus/run-node/issues"},"license":"MIT"}