-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
[BUG] npm/npx is not handling directories with spaces (on Windows) correctly #502
Comments
There seem to be multiple layers of issues here and I'm still trying to figure out which package is responsible for the root issue. The stack traces about
There needs to be an extra check to handle a config that's missing entirely:
I've made these changes locally and all those errors and stack traces have gone away (but I'm still running into the malformed directory issue). |
Try this
|
Hey that worked! Oh wow, thanks so much. This was a million times more helpful than the support I received from npm. |
you are welcome :) |
Sometimes, `npm.config` can be missing entirely, but there are several places where `npm.config.foo` is accessed blindly, resulting in these kinds of errors and stack traces: TypeError: Cannot read property 'get' of undefined at errorMessage (.../lib/utils/error-message.js:38:39) ... TypeError: Cannot read property 'loaded' of undefined at exit (.../lib/utils/error-handler.js:97:27) ... LBYL by checking `npm.config` first. Addresses a small part of #502. PR-URL: #508 Credit: @ Close: #508 Reviewed-by: @darcy Clarke
Just encountered this. It still exists in |
I was having this issue as well but after installing the latest version of npm 7, the problem went away. @bnb npm install -g npm@7 |
@darcyclarke seems there are multiple people reporting this solved in npm@7. Maybe either making this |
@bnb going to set as |
When I try to install packages (specifically, this one: https://www.npmjs.com/package/ts-rws) with the latest version of npm (6.13.0) on Windows 10, I get an error and a stack trace:
The problem is that npm/npx is not quoting some directory correctly, which results in this:
I've been seeing this issue for a long time now (npx commands don't work on Windows), and I've been able to ignore the problem in the past, but now I can't install packages anymore, which is a huge problem. Is there a fix for this?
The text was updated successfully, but these errors were encountered: