You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The existing issue was closed with the reason JS shouldn't be in your pathext environment variable. While that is a solution, it is a completely invalid solution from my perspective.
It took me 2 hours of debugging to identify that was the problem, and in case you were unaware, that is the default in Windows. Though it certainly seems like you are aware given you attempt to remove it in the shim. Now that I know what it is, its an easy fix, but that's a terrible developer experience and needs fixing.
create a file called node.js in the same directory as the package.json you will be running scripts from OR the directory you run the command directly from
run the script via a script in package.json OR with npx
notice the file opens and the script never runs
Environment
npm: 8.16.0
Node: 16.15.1
OS: Windows 10 Home 21H2 (19044.1826)
platform: Desktop
The text was updated successfully, but these errors were encountered:
To avoid inadvertently running node.js (using Windows Script Host)
instead of node.exe when .js is present in %PATHEXT% (as it is by
default). The problem is exacerbated by a regression in .cmd shims
generated by npm (npm/cmd-shim#64npm/cmd-shim#71) and has already caused
problems in CI (actions/setup-node#720).
Continue to export node and node.js from the package for backward
compatibility. These may be removed in a future version.
Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
Is there an existing issue for this?
The existing issue was closed with the reason
JS
shouldn't be in your pathext environment variable. While that is a solution, it is a completely invalid solution from my perspective.It took me 2 hours of debugging to identify that was the problem, and in case you were unaware, that is the default in Windows. Though it certainly seems like you are aware given you attempt to remove it in the shim. Now that I know what it is, its an easy fix, but that's a terrible developer experience and needs fixing.
Current Behavior
For reference, npms generated shim for rimraf:
Expected Behavior
For reference, yarns generated shim for rimraf:
Steps To Reproduce
Environment
The text was updated successfully, but these errors were encountered: