Skip to content
This repository has been archived by the owner on Jul 6, 2019. It is now read-only.

npx it not being tested in windows #168

Closed
cekvenich opened this issue Mar 25, 2018 · 11 comments
Closed

npx it not being tested in windows #168

cekvenich opened this issue Mar 25, 2018 · 11 comments

Comments

@cekvenich
Copy link

cekvenich commented Mar 25, 2018

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.

@cekvenich
Copy link
Author

cekvenich commented Mar 25, 2018

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 "

@cekvenich cekvenich reopened this Mar 26, 2018
@cekvenich cekvenich changed the title npx does not work in windows. npx it not being tested in windows Mar 26, 2018
@cekvenich
Copy link
Author

cekvenich commented Apr 25, 2018

@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 )

@rich-newman
Copy link

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.

@cekvenich
Copy link
Author

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.

@TotallyInformation
Copy link

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.

@puppetmaster3
Copy link

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.

@zkat
Copy link
Owner

zkat commented May 3, 2018

Closing this partially as a duplicate of #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.

@zkat zkat closed this as completed May 3, 2018
@cekvenich
Copy link
Author

Regarding ' npx is tested on Windows' - clearly the test are insufficient.

We would like node org to address and have sufficient testing on windows.

@zkat
Copy link
Owner

zkat commented May 4, 2018

@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.

@cekvenich
Copy link
Author

@zkat

  1. node org ships npx, so the management at node is responsible for this, this is their problem.
  2. It appears that at least from node POV, you are reporting to them and they think of you as a part of their team ( http://linkedin.com/in/katmarchan ) . But it appears you are right, they are not monitoring neither you, nor their project. As I said in this bug npx it not being tested in windows #168, they should state that windows is not supported in the read me here, no need for me to do a pr.
  3. In the issue tracker you mention, we have a bug that you closed: http://github.com/zkat/npx/issues/144
    I asked for the patch or commit that fixed it - I suspect there are none? You said 'This should have been fixed ' , did you mean to say 'this has been open for a while, I should just close it'.

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.

@zkat
Copy link
Owner

zkat commented May 5, 2018

@cekvenich

  1. Yup, this is -their- problem, not mine. I'm still working to make npx work well. A bug is a bug, and I think your issue OP is overblown.
  2. node is not anywhere on my LinkedIn (which... it's a bit creepy for you to be looking up like that? just sayin'). I work for npm, Inc, which is a C Corporation that is 100% independent from the Node Foundation. We have a working relationship, but I am not, in any way, actually beholden to Node Core. I just try to cooperate with them as a separate person.
  3. fix npx prefix issue npm/npm#19608. Read the thread. It's in the thread. The thread that you commented in.

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.

Repository owner locked as too heated and limited conversation to collaborators May 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants