Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dangh/373fe317e46b872caee20a4847e1930d to your computer and use it in GitHub Desktop.
Save dangh/373fe317e46b872caee20a4847e1930d to your computer and use it in GitHub Desktop.
Fix npm doesn't regconize node_modules binary files

Try to run bin file with and without extension:

.\node_modules\.bin\electron.cmd
.\node_modules\.bin\electron

If it's work with extension but not without, check PATHEXT environment variable.

echo %PATHEXT%
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW

Windows might treat PATHEXT as case-sensitive. Change PATHEXT variable to include lowercase extensions.

set PATHEXT=.COM;.com;.EXE;.exe;.BAT;.bat;.CMD;.cmd;.VBS;.vbs;.VBE;.vbe;.JS;.js;.JSE;.jse;.WSF;.wsf;.WSH;.wsh;.MSC;.msc;.PY;.py;.PYW;.pyw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment