Closed cekvenich closed 6 years ago
Other than full path, the other way to fix this registry setting, can be done in GUI: https://www.dropbox.com/s/ws76r7sl6qqxoil/js.PNG?dl=0 You get to that screen via 'show desktop icons'.
Then you can just run it as normal command line node cli (| w/o npx) - from the windows menu called "node.js command prompt "
@rich-newman One way to 'monkey patch' is:
node $Env:userprofile/WHERE-YOU-INSTALLED/node_modules/nbake/nbake.js .
Where nbake is your npm module.
( my project where I do that is here, WIP http://github.com/topseed/nbake-user )
Oh I see. I was hoping for a workaround that would let me use npx without errors on Windows, because npx has some quite cool features.
Same here. I don't see source for npx.cmd so I can fix it for them.
Works fine on mac, linux, docker. Just Windows it does not work.
Given that npx is now distributed with Node.JS, this is a VERY IMPORTANT thing to fix!
I don't pretend to understand all of the technical details but please bear in mind that this - to users - is an npx error, not an npm error. That's because npm works just fine on Windows, npx does not.
I am not trying to be negative. This is a great tool and I want to see it succeed.
TotallyInformation I do think the fix is: 'test on windows'.
And also I think that npx is part of node now, so it is node org that has a blemish.
Currently, I can't even find the source code for npx.cmd. What I did is identify the root cause, before my post all the reports on www said they could not ID the cause.
Closing this partially as a duplicate of https://github.com/zkat/npx/issues/144
Also closing this because npx is tested on Windows. You can see the appveyor page, which runs the npx test suite on Windows. Specific bugs will be specific bugs, but there's certainly a test suite, and it's certainly running on Windows. Please file issues for specific bugs.
Regarding ' npx is tested on Windows' - clearly the test are insufficient.
We would like node org to address and have sufficient testing on windows.
@cekvenich what the node org does is not my problem. I'm not involved with them, and I am not part of any of their teams. If you want their stuff to be tested better, go to their issue tracker.
And if you find a missing test, I'll gladly take a PR.
@zkat
Node management should monitor their sr engineer, at least for ethics, like their monitor their projects. It reflects on node, if they should be considered a stable enterprise level platform. That is my takeaway from the two interactions I had with their sr engineer.
@cekvenich
I'm not even going to respond to this last paragraph, but I -will- lock this issue. I look forward to accepting a PR from you fixing the issues you're having, in the spirit of Open Source and good ethics.
In windows, it does not run a global js via/in node.js npx instead runs via 'Microsoft JScript runtime' in windows, es5
To reproduce, run ES2016+ js, that would run on current version of node: A) via npx B) via 'node full_path_to_global_js_yarn_or_npm.js'
B runs as expected. A gives JScript errors. What is JScript?
If you want to test on a package, try A and B w/ https://github.com/pugjs/pug-cli
Main issue is project testing this process runner in windows, or at lest list any supported environments prominently. Even args in windows. Else it makes you think if node is a serious org.