-
Notifications
You must be signed in to change notification settings - Fork 71
npx -n on Windows broken since cmd-shim 3.x #5
Comments
Still happens in [email protected] Works after going back to npm 6.10.3 and doing |
I really liked this feature. It was handy for setting node options before npm package execution:
right now it looks way fragile (because I should know the
|
Just found that accordingly to https://blog.npmjs.org/post/626173315965468672/npm-v7-series-beta-release-and-semver-major the new npm v7 will get a new npx implementation (look at npx section in this article). And also this article states that:
So it looks like this feature will be completely dropped 😕 |
Can it be documented more clearly exactly what the intention of npx/npm exec are for? At first it seemed like they were more or less a really functional alias for I feel like there's definitely a use case for them when it comes to being able to exec package cli tools without having to explicitly install the cli tool package or maintain the package as a devDependency when you only need the package for a single initialization command. I'm thinking mostly this benefits projects like react, angular, and other front-end frameworks that leverage npx with their tool to initialize their framework into a directory and give the directory a template package.json that the developer can begin working with. I see a lot of value in npx here though admittedly it would be even nicer if the --node-args flag was still recognized. |
Since npx now supports all standard npm configs (with the exception that Eg, instead of See: https://docs.npmjs.com/using-npm/config.html#node-options |
Since npm updated cmd-shim to v3.x (npm v6.11.0) it is no longer possible to pass node args to an pre-installed package via
--node-arg
/-n
with Windows cmd.This is due to the regex in
findNodeScript()
no longer matching the updated shims over here:npx/index.js
Line 357 in 43d68c8
Reproduction steps
A simple example:
This fails with:
The text was updated successfully, but these errors were encountered: