Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npx on windows - cannot find module with spaces in installation path #15095

Closed
BethGriggs opened this issue Aug 30, 2017 · 15 comments
Closed

npx on windows - cannot find module with spaces in installation path #15095

BethGriggs opened this issue Aug 30, 2017 · 15 comments
Labels
npm Issues and PRs related to the npm client dependency or the npm registry. windows Issues and PRs related to the Windows platform.

Comments

@BethGriggs
Copy link
Member

When I try to run npx --version on Windows where the installation path contains a space, the module cannot be found. This issue is not seen when Node is installed to a path containing no spaces.

screen shot 2017-08-30 at 16 11 34

  • Version: 8.4.0
  • Platform: Windows

(https://nodejs.org/dist/v8.4.0/node-v8.4.0-x64.msi)

@Fishrock123
Copy link
Contributor

This should be reported to https://github.com/zkat/npx

@Fishrock123 Fishrock123 added npm Issues and PRs related to the npm client dependency or the npm registry. windows Issues and PRs related to the Windows platform. labels Aug 30, 2017
@TimothyGu
Copy link
Member

I suspect this should probably be filed against the npx repo instead.

/cc @zkat

@gibfahn
Copy link
Member

gibfahn commented Aug 31, 2017

Looks like zkat/npx#110

However I think it's worth having an issue here to note/track that the npx that comes with node is broken with the default windows install location (and the default shell).

@gibfahn
Copy link
Member

gibfahn commented Sep 5, 2017

Try enclosing the whole path with double quote.

@LuciusAterna not really possible, this happens when you run npx, you don't specify the path to node.

@bzoz
Copy link
Contributor

bzoz commented Sep 11, 2017

The issue here is not the Node.js path (it spawns just fine) but the npm-cli.js path containing spaces. This was fixed in zkat/npx@314e5eb, which is included in npm 5.4.0.

@gibfahn
Copy link
Member

gibfahn commented Sep 11, 2017

@nodejs/npm I know you guys are crazy busy, but an update to 5.4.0 (or even 5.4.1) would be really good, sounds like it has a bunch of new stuff!

@bzoz
Copy link
Contributor

bzoz commented Sep 13, 2017

Since #15347 got closed, maybe we should add a float patch zkat/npx@314e5eb, to make npx work?

@gibfahn
Copy link
Member

gibfahn commented Sep 13, 2017

Since #15347 got closed, maybe we should add a float patch zkat/npx@314e5eb, to make npx work?

Depends how soon 5.4.2 is going to be out. I assume it'll be out pretty soon, in which case it probably makes more sense to just wait for that. This is a new feature that most people are unlikely to be relying on yet.

@michaeljota
Copy link

Why no to update the npm version in latest yet? I was waiting for 8.5.0 to include this fix, but even when 5.4.x has been released before 8.5.0, it did not land there. Why?
(If it sounds rude, I did not mean it... I'm just curious)

@zkat
Copy link
Contributor

zkat commented Sep 15, 2017

npm in node has included zkat/npx@314e5eb since 5.4.0. There's more issues here.

@michaeljota
Copy link

michaeljota commented Sep 15, 2017

Nope. npm as include the fix in 5.4.x and Node currently includes npm 5.3.0.

I just downloaded Node 8.5.0, got disappointed that it did not include the fix, and come here to comment.

@michaeljota
Copy link

So... From comments in #15600 I can assume that the upgrade have not landed yet cause the stability of npm@5.4.0, but seems like npm@5.4.2 is stable enough to land here before Node 8 go turbo LTS...

@Lonsiege
Copy link

Looks like it is fixed in npm@5.5.1
image

@michaeljota
Copy link

Not sure if it got fixed or this is the same error with different message

@bzoz
Copy link
Contributor

bzoz commented Apr 13, 2018

Fixed in #15600

@bzoz bzoz closed this as completed Apr 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
npm Issues and PRs related to the npm client dependency or the npm registry. windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

No branches or pull requests

9 participants