GitShow/sindresorhus/run-node
sindresorhus

run-node

Run the Node.js binary no matter what

by sindresorhus
Star on GitHubFork

Shell

142 stars11 forks6 contributorsQuiet · 9mo agoSince 2016v3.0.0MIT

Meet the team

See all 6 on GitHub →
sindresorhus
sindresorhus17 contributions
mearns
mearns1 contribution
mafredri
mafredri1 contribution
nmssilva
nmssilva1 contribution
Richienb
Richienb1 contribution
nocoolnametom
nocoolnametom1 contribution

Languages

View on GitHub →
Shell100%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
85
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template

Recent fixes

View closed PRs →
wesleytodd
Any dep which installs `node` will override the node versionClosedIssue

https://github.com/sindresorhus/run-node/blob/master/run-node#L4 Due to the combination of this line and the hoisting done on installs, any dep in your tree which installs will result in all calls via to use it, even if the top level project did not intend this behavior. The only workaround I can see without changes to this lib is to also install of your own version at the top level of each project. I think that parsing json in bash to determine if it is a top level dep is a hard problem best avoided, but IMO this bug makes this module actively harmful in the contexts which I have seen it used. One idea I had, which would resolve it in the use case I encountered this, is to use if it exists as the first check. This would at least ensure that if it was run in the context of a package.json script with it would use the same node version found in the parent process. I am happy to open this PR if this seems like a good resolution to the problem above.

wesleytodd · 9mo ago
futurist
Add support for running npxClosedIssue

Sometimes run is supposed instead of as the target command. Better to integrate the two like below: In addition to: The syntax can be any form, above only for a demo purpose.

futurist · 9mo ago
alex7kom
Old version of nvm's Node.js in ~/.node_pathClosedIssue

caches the path with nvm version of Node.js that set as default when first runs. Right now ignores a stale only when is not found, but there are other cases to consider: 1. A new version of Node.js was installed and set as default via nvm. will continue to run the old version because the path in is not updated. 2. A new version of Node.js was installed and set as default via nvm, and the old version is deleted. will not run the new version, and will run found further in the path (like one installed via Homebrew).

alex7kom · 9mo ago
Structured data for AI agents

Repository: sindresorhus/run-node. Description: Run the Node.js binary no matter what Stars: 142, Forks: 11. Primary language: Shell. Languages: Shell (100%). License: MIT. Latest release: v3.0.0 (9mo ago). Open PRs: 0, open issues: 0. Last activity: 9mo ago. Community health: 85%. Top contributors: sindresorhus, mearns, mafredri, nmssilva, Richienb, nocoolnametom.

·@ofershap

Replace github.com with gitshow.dev