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

Fails on Windows 10 because a directory is not being quoted #9

Open
kaiyoma opened this issue Nov 20, 2019 · 2 comments
Open

Fails on Windows 10 because a directory is not being quoted #9

kaiyoma opened this issue Nov 20, 2019 · 2 comments

Comments

@kaiyoma
Copy link

kaiyoma commented Nov 20, 2019

$ npx npm-force-resolutions
Error: EPERM: operation not permitted, mkdir 'C:\Users\Kyle'
TypeError: Cannot read property 'get' of undefined
    at errorMessage (C:\Program Files\Node.js\node_modules\npm\lib\utils\error-message.js:38:39)
    at errorHandler (C:\Program Files\Node.js\node_modules\npm\lib\utils\error-handler.js:201:13)
    at C:\Program Files\Node.js\node_modules\npm\bin\npm-cli.js:78:20
    at cb (C:\Program Files\Node.js\node_modules\npm\lib\npm.js:225:22)
    at C:\Program Files\Node.js\node_modules\npm\lib\npm.js:263:24
    at C:\Program Files\Node.js\node_modules\npm\lib\config\core.js:81:7
    at Array.forEach (<anonymous>)
    at C:\Program Files\Node.js\node_modules\npm\lib\config\core.js:80:13
    at f (C:\Program Files\Node.js\node_modules\npm\node_modules\once\once.js:25:25)
    at afterExtras (C:\Program Files\Node.js\node_modules\npm\lib\config\core.js:171:20)
C:\Program Files\Node.js\node_modules\npm\lib\utils\error-handler.js:97
  var doExit = npm.config.loaded ? npm.config.get('_exit') : true
                          ^

TypeError: Cannot read property 'loaded' of undefined
    at exit (C:\Program Files\Node.js\node_modules\npm\lib\utils\error-handler.js:97:27)
    at process.errorHandler (C:\Program Files\Node.js\node_modules\npm\lib\utils\error-handler.js:216:3)
    at process.emit (events.js:198:13)
    at process._fatalException (internal/bootstrap/node.js:496:27)
Install for npm-force-resolutions@latest failed with code 7

The Cannot read property ... errors are issues in npm, which are being tracked here: npm/cli#502

The problem here appears to be a directory name that contains spaces but isn't being quoted properly:

Error: EPERM: operation not permitted, mkdir 'C:\Users\Kyle'

This is preventing me from installing packages successfully.

@OZZlE
Copy link

OZZlE commented Apr 8, 2020

Was this fixed or? considering using this but some team members use Windows and I don't know if they have spaces or not in their folder names

@ronaldbarendse
Copy link

This error doesn't seem to be related to this package, as it doesn't read any npm config values and already correctly quotes paths and file names...

The linked npm issue also contains a comment that updates the npm config paths to the 8.3/short filename convention: npm/cli#502 (comment) and npm 6.14.0 fixes the Cannot read property 'get' of undefined error: https://github.com/npm/cli/releases/tag/v6.14.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants