-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] npx . launches bin script in shell #7201
Comments
I’m confused; executing it with node would be up to the shebang in the file referenced by the build script. |
What does |
|
Ahh. When a package like that is installed, npm creates the appropriate infra required to make it runnable directly, but that wouldn’t be present in the current package. In which version of npm/npx did this work? |
Works perfectly with npx 6.14.16 / node 14.19.1
It would be great if npm could detech local usage and support it. I think it would also be reasonable to skip caching the local project. |
One more thing... The package is being copied to ~/.npm/, as a result of executing |
@PRR24 I think you should have |
Closing due to age. If this is still a problem please feel free to reopen this issue, or create a new issue w/ steps to reproduce. |
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
Launching
npx .
within module executes script defined in package.json/bin in shell.Expected Behavior
Script is executed with node.
It was executed with node in older versions of the npm.
Steps To Reproduce
console.log("test");
"bin": "./index.js"
Environment
The text was updated successfully, but these errors were encountered: