I tried changing my username and home directory on my Windows 10 machine recently, and I got 95% of the cases out of the way, but npm is one of the last ones. The error you're seeing means that npm thinks that my home directory is at c:\Users\Joshua Holbrook
instead of c:\Users\Josh
. 🙃 So the question is, how do I trace this back to the code that decides where my home directory is?
Created
August 28, 2019 02:37
-
-
Save jfhbrook/6aab3a291a1316fb899e8b1a18298d2d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS C:\Users\Josh> npm | |
Error: EPERM: operation not permitted, mkdir 'C:\Users\Joshua Holbrook' | |
TypeError: Cannot read property 'get' of undefined | |
at errorHandler (C:\Users\Josh\AppData\Roaming\npm\node_modules\npm\lib\utils\error-handler.js:205:18) | |
at C:\Users\Josh\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js:78:20 | |
at cb (C:\Users\Josh\AppData\Roaming\npm\node_modules\npm\lib\npm.js:228:22) | |
at C:\Users\Josh\AppData\Roaming\npm\node_modules\npm\lib\npm.js:266:24 | |
at C:\Users\Josh\AppData\Roaming\npm\node_modules\npm\lib\config\core.js:83:7 | |
at Array.forEach (<anonymous>) | |
at C:\Users\Josh\AppData\Roaming\npm\node_modules\npm\lib\config\core.js:82:13 | |
at f (C:\Users\Josh\AppData\Roaming\npm\node_modules\npm\node_modules\once\once.js:25:25) | |
at afterExtras (C:\Users\Josh\AppData\Roaming\npm\node_modules\npm\lib\config\core.js:173:20) | |
at Conf.<anonymous> (C:\Users\Josh\AppData\Roaming\npm\node_modules\npm\lib\config\core.js:229:20) | |
C:\Users\Josh\AppData\Roaming\npm\node_modules\npm\lib\utils\error-handler.js:205 | |
if (npm.config.get('json')) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment