Closed slavafomin closed 5 years ago
Is npm-run-all
installed globally, or locally, or both? Is it listed as a dependency in the local package.json
file?
What does it happen if you use ./node_modules/.bin/run-s
?
Is
npm-run-all
installed globally, or locally, or both? Is it listed as a dependency in the localpackage.json
file?
The npm-run-all
is installed locally as a dev-dependency in my package.json
. There is no global version installed:
"devDependencies": {
…
"npm-run-all": "^4.1.5",
…
}
What does it happen if you use
./node_modules/.bin/run-s
?
The result is the same as with npx run-s
, e.g. the dependency is resolved.
Wow, it looks like the mystery is solved. It appears that Rush replaces the script in ./node_modules/.bin
directory with it's own bash-script that sets the NODE_PATH
variable, which actually changes the resolution behavior.
It seems that this issue is not related to the npm-run-all
itself. Sorry for the false alarm.
Hello!
Thank you for this great tool!
However, we've stumbled upon a strange behavior, maybe you could clarify it for us.
I've created a very simple script with the following content:
When I execute it directly via
npm run
, it says that it can't find a package, which is correct, because the package is not installed locally in the project. But, when I run the same script usingnpx run-s
, the package gets resolved somehow to a path, which shouldn't be available to the local project.How does the "npm-run-all" affects a resolution behavior?
Also, our project is maintained with Rush.
Thanks!