Comments (93)
I was able to fix this in Windows by creating a directory junction to my users folder that didn't have a space in it. You can run a command like this in an administrative powershell:
cmd /c mklink /J "C:\Users\myname" "C:\Users\My Name"
You can then use this junction as if it were your real user directory:
npm config set cache C:\Users\myname\AppData\Roaming\npm-cache
npm config set prefix C:\Users\myname\AppData\Roaming\npm
(the above should update your user .npmrc file)
from npx.
I had the similar issue. Got fixed just by cleaning the npm cache.
npm cache clean
from npx.
running cmd through administrator works for me
from npx.
If anybody still have this issue. I got it resolved using npm install -g create-react-app
and then npx create-react-app <appname>
Make sure your appname doesn't have any capital letters.
from npx.
The @manojkumardesai solution has worked for me just fine.
npm install -g create-react-app
npx create-react-app <app-name>
from npx.
@manojkumardesai thanks for sharing
Below steps worked for me
npm install -g create-react-app
npx create-react-app <appname>
from npx.
npm clean cache doesn't work. No NPM commands work. They are all result in this same error. Even npm -v
from npx.
I think you should excute this command on administrator "npm config set prefix path/to/Actual_npm_folder"
from npx.
My user name was "C:\Users\Carolina Maciel" i used:
1º)cmd /c mklink /J "C:\Users\myname" "C:\Users\My Name"
2º) npm config set cache C:\Users\myname\AppData\Roaming\npm-cache
3º) npm config set prefix C:\Users\myname\AppData\Roaming\npm
if not work, use:
npm cache clean --force
Worked for me, hope helps for u!
from npx.
I also have this issue, although it is failing on mkdir of a username with a space in it, that is not on my computer. Is this a config setting I should change (maybe it somehow mixed up user config that I had on an old computer)?
Fixed
Did a search for .npmrc file, and changed prefix=
to the correct user.
from npx.
Removing npmrc worked for me
from npx.
I think i set the "npm config set prefix= to something" mistakenly due to which i was getting the error. Here's how i fixed it:
Open CMD in "Administrator" mode.
npm cache clear --force
npm install
npm config set cache C:\Users\myname\AppData\Roaming\npm-cache
npm config set prefix C:\Users\myname\AppData\Roaming\npm
Happy coding.
from npx.
Heres is my solution:
npm install -g create-react-app
npx create-react-app my-app
cd my-app
npm start
the only thing i think about is making sure npx is up to date.
from npx.
Error: EPERM: operation not permitted, mkdir 'C:\Users\Foo'
TypeError: Cannot read property 'get' of undefined
at errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:213:17)
at C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js:83:20
at cb (C:\Program Files\nodejs\node_modules\npm\lib\npm.js:215:22)
at C:\Program Files\nodejs\node_modules\npm\lib\npm.js:253:24
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:81:7
at Array.forEach (native)
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:80:13
at f (C:\Program Files\nodejs\node_modules\npm\node_modules\once\once.js:25:25)
at afterExtras (C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:178:20)
at C:\Program Files\nodejs\node_modules\npm\node_modules\mkdirp\index.js:47:53
C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:213
if (npm.config.get('json')) {
^
TypeError: Cannot read property 'get' of undefined
at process.errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:213:17)
at emitOne (events.js:115:13)
at process.emit (events.js:210:7)
at process._fatalException (bootstrap_node.js:329:26)
Install for prefix@latest failed with code 7
Error: EPERM: operation not permitted, mkdir 'C:\Users\Foo'
TypeError: Cannot read property 'get' of undefined
at errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:213:17)
at C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js:83:20
at cb (C:\Program Files\nodejs\node_modules\npm\lib\npm.js:215:22)
at C:\Program Files\nodejs\node_modules\npm\lib\npm.js:253:24
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:81:7
at Array.forEach (native)
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:80:13
at f (C:\Program Files\nodejs\node_modules\npm\node_modules\once\once.js:25:25)
at afterExtras (C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:178:20)
at C:\Program Files\nodejs\node_modules\npm\node_modules\mkdirp\index.js:47:53
C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:213
if (npm.config.get('json')) {
^
TypeError: Cannot read property 'get' of undefined
at process.errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:213:17)
at emitOne (events.js:115:13)
at process.emit (events.js:210:7)
at process._fatalException (bootstrap_node.js:329:26)
Install for cowsay@latest failed with code 7
from npx.
find the NPMRC file located in C:\Users\ . oped this file in text editor and remove what ever is written there like "prefix=C:/Program Files/nodejs/npm_global" and save again . now run NPM command it will work :)
from npx.
@manojkumardesai Thank you
npm install -g create-react-app
npx create-react-app
works
from npx.
If you are looking into this problem with using Microsoft Visual Studio, Run Microsoft Visual Studio as Administrator and the problem will be solved.
from npx.
I think npx is working for me now, though it always says
npx: installed 1 in 1.784s
command not found: prefix
before printing the command output. Anyway, none of the "fixes" posted before the one @edwardbrowncross wrote worked for me. I believe that a bunch of people in this thread actually have a totally unrelated problem with a similar stack trace. The actual issue (spaces in your Windows profile directory path) is supposed to be resolved by #181, though I have no idea why that hasn't been merged yet.
In the interim, if you have this issue, you can fix it without administrative privileges. On my machine, I only have to specify cache
in my .npmrc
, not prefix
, and I set it to c:\Users\jamesb~1\AppData\Roaming\npm-cache
. Note that jamesb~1
-- that's the generated 8.3 filename (for DOS compatibility) that matches my actual user profile dir. You can view these short names with dir /x
, if need be.
from npx.
I was able to fix this in Windows by creating a directory junction to my users folder that didn't have a space in it. You can run a command like this in an administrative powershell:
cmd /c mklink /J "C:\Users\myname" "C:\Users\My Name"
You can then use this junction as if it were your real user directory:
npm config set cache C:\Users\myname\AppData\Roaming\npm-cache npm config set prefix C:\Users\myname\AppData\Roaming\npm
(the above should update your user .npmrc file)
Life Saver.. Love you man
from npx.
Consider the following flow:
- A new user on Windows 10 decides to try out Node + React.
- They install Node 10.15.1 LTS from the main site .
- They try running
npx create-react-app my-app
; it fails with the mentionedEPERM
error. - They try running
npm init react-app my-app
, alternate command mentioned on React site; same error. - The user spends 30 minutes tracking down this issue in GitHub.
All Windows users with a space in their filename will encounter this issue. It looks like there was some movement at #181 , but then the work tailed off and wasn't merged. Perhaps if the proper fix can't get completed anytime soon, a more informative message could get printed when the problem is detected.
from npx.
@manojkumardesai Thank you
npm install -g create-react-app
npx create-react-appworks
This work for me too
from npx.
I noticed that the path in the error message cut off prior to the first space. The path to my user folder is 'C:\Users\Paul Cyr'.
Environment: Windows 10 Build 15063.726
Error: EPERM: operation not permitted, mkdir 'C:\Users\Paul'
TypeError: Cannot read property 'get' of undefined
at errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18)
at C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js:83:20
at cb (C:\Program Files\nodejs\node_modules\npm\lib\npm.js:214:22)
at C:\Program Files\nodejs\node_modules\npm\lib\npm.js:252:24
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:81:7
at Array.forEach (<anonymous>)
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:80:13
at f (C:\Program Files\nodejs\node_modules\npm\node_modules\once\once.js:25:25)
at afterExtras (C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:178:20)
at C:\Program Files\nodejs\node_modules\npm\node_modules\mkdirp\index.js:47:53
C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205
if (npm.config.get('json')) {
^
TypeError: Cannot read property 'get' of undefined
at process.errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18)
at emitOne (events.js:116:13)
at process.emit (events.js:211:7)
at process._fatalException (bootstrap_node.js:374:26)
Install for prefix@latest failed with code 7
Error: EPERM: operation not permitted, mkdir 'C:\Users\Paul'
TypeError: Cannot read property 'get' of undefined
at errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18)
at C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js:83:20
at cb (C:\Program Files\nodejs\node_modules\npm\lib\npm.js:214:22)
at C:\Program Files\nodejs\node_modules\npm\lib\npm.js:252:24
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:81:7
at Array.forEach (<anonymous>)
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:80:13
at f (C:\Program Files\nodejs\node_modules\npm\node_modules\once\once.js:25:25)
at afterExtras (C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:178:20)
at C:\Program Files\nodejs\node_modules\npm\node_modules\mkdirp\index.js:47:53
C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205
if (npm.config.get('json')) {
^
TypeError: Cannot read property 'get' of undefined
at process.errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18)
at emitOne (events.js:116:13)
at process.emit (events.js:211:7)
at process._fatalException (bootstrap_node.js:374:26)
Install for webpack@latest failed with code 7
from npx.
Am I reading this right, that there's a fix (#138) but until it gets merged, npx
doesn't work on Windows (if my profile dir has a space in it)? Bummer, I just found out about npx
today and got all excited to stop typing ./node_modules/.bin
so much...
from npx.
I can confirm that @edwardbrowncross 's method works. Thanks!
from npx.
if you have node version less than 10 but greater than 8.10 installed on your system.Then follow below method
First install create-react-app ->
npm install -g create-react-app
Then using npx write following command on command prompt or bash->
npx create-react-app
Else pls upgrade your node version to 10 and use following command only to create a react app
npx create-react-app
Cheer up
from npx.
Workarounds aside, is there any chance this gets fixed? The issue is quite old, but the issue still remains.
from npx.
Any update on when the fix for this will be included? It is popping up through more and more modules
from npx.
@falakejaz Do you mean npx create-react-app
? npm create-react-app
won't work
from npx.
@manojkumardesai : fix your spelling of 'create' as asked by @pasunmaa
from npx.
thanks @manojkumardesai !! worked for me
from npx.
I still have this problem (just tried with react-styleguidist). I have tried previous suggestions but to no avail:
- I tried removing my
.npmrc
(C:\Users\Toke Voltelen\.npmrc
) - I tried adding
prefix=C:\Users\Toke Voltelen
to the .npmrc - I have cleared npm cache (
npm cache clean --force
)
I am not sure what else to try at the moment.
NPM Version : 6.2.0
OS: Windows 10 Home 64 bit
from npx.
So I just solved the problem BUT I took the longest and most stupid path so, please, don't do it: I've changed my Windows username (without spaces this time, of course) -> changed user name folder (without spaces) -> had to waste like 4 hours manually cleaning the registry (regedit -> find "old username" -> change it -> f3 to see next). So now npx works for me.
@hdwebpros Yes I did, but it didn't work.
from npx.
This is work for me,I got it resolved using npm install -g create-react-app and create project npx create-react-app myapp
from npx.
It's a escape error, this escape for / path works for me: "\/"
platform is win10
from npx.
I found these solutions, which worked for me!
You need to change the cache to a location without spaces.
from npx.
npm cache verify
npm cache clean --force
i'm have a try!!
from npx.
Heres is my solution:
npm install -g create-react-app
npx create-react-app my-app
cd my-app
npm start
the only thing i think about is making sure npx is up to date.
This worked for me as well (still having space in my username on Windows 10)
from npx.
@Meeeeow could you post the actual terminal output for this, please? I'm not exactly sure which place it's coming from with just this info.
from npx.
Thanks! This looks like a bug in npm itself. I'll look into it!
from npx.
Error: EPERM: operation not permitted, mkdir 'C:\Program Files\Java\JDK.ioni
at Error (native)
at Object.fs.mkdirSync (fs.js:924:18)
at new IonicStore (D:\ConCustomer\node_modules\ionic\lib\ionic\store.js:2
)
at Object. (D:\ConCustomer\node_modules\ionic\lib\cli.js:6:19)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
from npx.
can anyone tell me how to fix this ????
from npx.
Changing the command from webpack --config webpack.config.js
to node_modules\.bin\webpack --config webpack.config.js
solved my problem.
from npx.
I have the same problem but I have only encountered it with 2 modules so far.
NVM for windows and TSlint.
OS: Windows 10
NPM: 5.6.0
from npx.
I was hit with the same problem, same backtrace, and for the same reason as the OP .
NPM: 5.6.0
Node: 9.2.0
OS: Windows 10 version 1709 (Fall Creators Update)
from npx.
any news if there ways to resolved the issue regarding user profile paths with spaces.
from npx.
i m also facing same problem
Error: EPERM: operation not permitted, mkdir 'C:\Users\user'
TypeError: Cannot read property 'get' of undefined
at errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18)
at C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js:83:20
at cb (C:\Program Files\nodejs\node_modules\npm\lib\npm.js:224:22)
at C:\Program Files\nodejs\node_modules\npm\lib\npm.js:262:24
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:81:7
at Array.forEach ()
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:80:13
at f (C:\Program Files\nodejs\node_modules\npm\node_modules\once\once.js:25:25)
at afterExtras (C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:178:20)
at C:\Program Files\nodejs\node_modules\npm\node_modules\mkdirp\index.js:35:29
at C:\Program Files\nodejs\node_modules\npm\node_modules\mkdirp\index.js:35:29
at C:\Program Files\nodejs\node_modules\npm\node_modules\mkdirp\index.js:35:29
at C:\Program Files\nodejs\node_modules\npm\node_modules\mkdirp\index.js:47:53
at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
at FSReqWrap.oncomplete (fs.js:152:21)
C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205
if (npm.config.get('json')) {
^
TypeError: Cannot read property 'get' of undefined
at process.errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18)
at emitOne (events.js:116:13)
at process.emit (events.js:211:7)
at process._fatalException (bootstrap_node.js:375:26)
Error: EPERM: operation not permitted, mkdir 'C:\Users\user'
TypeError: Cannot read property 'get' of undefined
at errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18)
at C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js:83:20
at cb (C:\Program Files\nodejs\node_modules\npm\lib\npm.js:224:22)
at C:\Program Files\nodejs\node_modules\npm\lib\npm.js:262:24
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:81:7
at Array.forEach ()
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:80:13
at f (C:\Program Files\nodejs\node_modules\npm\node_modules\once\once.js:25:25)
at afterExtras (C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:178:20)
at C:\Program Files\nodejs\node_modules\npm\node_modules\mkdirp\index.js:35:29
at C:\Program Files\nodejs\node_modules\npm\node_modules\mkdirp\index.js:35:29
at C:\Program Files\nodejs\node_modules\npm\node_modules\mkdirp\index.js:35:29
at C:\Program Files\nodejs\node_modules\npm\node_modules\mkdirp\index.js:47:53
at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29
at FSReqWrap.oncomplete (fs.js:152:21)
C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205
if (npm.config.get('json')) {
^
TypeError: Cannot read property 'get' of undefined
at process.errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18)
at emitOne (events.js:116:13)
at process.emit (events.js:211:7)
at process._fatalException (bootstrap_node.js:375:26)
not any single npm command work
from npx.
I'm still having the problem. Now with TypeScript as well. Exactly the same error as the ones above.
from npx.
Jumping in..
Same issue here
Error: EISDIR: illegal operation on a directory, read TypeError: Cannot read property 'get' of undefined at errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18) at C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js:83:20 at cb (C:\Program Files\nodejs\node_modules\npm\lib\npm.js:224:22) at C:\Program Files\nodejs\node_modules\npm\lib\npm.js:262:24 at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:81:7 at Array.forEach (<anonymous>) at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:80:13 at f (C:\Program Files\nodejs\node_modules\npm\node_modules\once\once.js:25:25) at finalize (C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:194:14) at Conf.afterCARead (C:\Program Files\nodejs\node_modules\npm\lib\config\load-cafile.js:14:14) at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:78:16 at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:495:12)
from npx.
Seeing the same behavior here with respect to paths with spaces. Appears to be limited to npx.
npm cache verify
has no effect.
Output as follows for directory C:\Users\Foo G. Bar
Error: EPERM: operation not permitted, mkdir 'C:\Users\Foo' TypeError: Cannot read property 'get' of undefined at errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18) at C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js:83:20 at cb (C:\Program Files\nodejs\node_modules\npm\lib\npm.js:224:22) at C:\Program Files\nodejs\node_modules\npm\lib\npm.js:262:24 at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:81:7 at Array.forEach (<anonymous>) at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:80:13 at f (C:\Program Files\nodejs\node_modules\npm\node_modules\once\once.js:25:25) at afterExtras (C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:178:20) at C:\Program Files\nodejs\node_modules\npm\node_modules\mkdirp\index.js:47:53 at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29 at FSReqWrap.oncomplete (fs.js:152:21)
from npx.
I have the same issue, but I'm on a Mac and I have no spaces in my home directory. Node is installed in /usr/local/....
Note that this problem goes away if I install using sudo
NPM Version 5.6
Tried on Nodes version 8.11 and 10.0
from npx.
Hi I got the same issue following solved mine
npm install -g create-react-app
then
npm create-react-app (your-app-name)
from npx.
I have similar issue, however it is only happening when I try to run my website in IIS (10.0)
Operating System: Windows 10 (10.0.15063)
Running through Visual Studio 2017 Enterprise (15.6.7).
And here is the stack trace:
Microsoft.AspNetCore.SpaServices:Error:
at errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18)
at C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js:83:20
at cb (C:\Program Files\nodejs\node_modules\npm\lib\npm.js:214:22)
at C:\Program Files\nodejs\node_modules\npm\lib\npm.js:252:24
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:81:7
at Array.forEach (<anonymous>)
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:80:13
at f (C:\Program Files\nodejs\node_modules\npm\node_modules\once\once.js:25:25)
at afterExtras (C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:178:20)
at C:\Program Files\nodejs\node_modules\npm\node_modules\mkdirp\index.js:47:53
C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205
if (npm.config.get('json')) {
^
TypeError: Cannot read property 'get' of undefined
at process.errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18)
at emitOne (events.js:116:13)
at process.emit (events.js:211:7)
at process._fatalException (bootstrap_node.js:374:26)
Error: EPERM: operation not permitted, mkdir
'C:\Windows\system32\config\systemprofile\AppData\Roaming\npm'
I am not sure if this will affect this issue but I am using Angular (5.2.8) with .NET Core 2.0 website.
It works fine for IIS Express but as soon as I try to use it with IIS it fails.
Kind Regards Lukasz
from npx.
I think it is related to being admin, some how. For instance I just tried to install and if you check Building
section it says;
//if use Windows:
npm config set prefix "C:/Program Files/nodejs/npm_global"
npm config set cache "C:/Program Files/nodejs/npm_cache"
I could set prefix but when I entered cache it gave the the typical error which everyone had above.
But when @patnaix said "running cmd through administrator works for me" , I opened Powershell as administrator and runned npc cache clean
first. Then ran the commands above and done it without getting any error.
I hope it helps.
from npx.
@sampana worked for me as well.
from npx.
@legendarynacar I tried changing npm cache location, no error, but still does not for (the npx)
@sampana removing npmrc doesnt seem to work too
from npx.
This helped with a small correction: npm install -g create-react-app
from npx.
I was getting the same issue, npm cache clean fixed it for me :)
from npx.
I was getting the same issue as well. I tried
I tried removing my .npmrc (C:\Users\My Name.npmrc)
I tried adding prefix=C:\Users\My Name to the .npmrc
I have cleared npm cache (npm cache clean --force)
I ran CMD as admin
I tried running npm config set prefix path/to/Actual_npm_folder
That is where I found my issue. After running that, I saw that the .npmrc file had
prefix=C:\Users\My
in it.
It should have read prefix=C:\Users\My Name\AppData\Roaming\npm
instead.
I manually changed that .npmrc file (make sure its uncommented too) to use the correct path for NPM (check your system environment variables for that path).
Run your command again and hopefully it will work.
NPM Version : 6.1.0
OS: Windows 10 Home 64 bit
from npx.
Still have the same problem after every step @hdwebpros did.
I changed .npmrc file, got this npm ERR! Could not install from "JustTheSecondPartOfMyUser\AppData\Roaming\npm-cache_npx\9944" as it does not contain a package.json file.
NPM Version: 5.6.0
OS: Windows 10 Home 64 bit
from npx.
@vicfabrice Did you specifically open that file, and find that line, and manually change it and save?
That's what made it work for me.
from npx.
@vicfabrice That sucks, but at least you have it working now. Hopefully this issue gets addressed soon for other users.
from npx.
Error: EISDIR: illegal operation on a directory, read
TypeError: Cannot read property 'get' of undefined
at errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18)
at C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js:76:20
at cb (C:\Program Files\nodejs\node_modules\npm\lib\npm.js:228:22)
at C:\Program Files\nodejs\node_modules\npm\lib\npm.js:266:24
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:83:7
at Array.forEach ()
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:82:13
at f (C:\Program Files\nodejs\node_modules\npm\node_modules\once\once.js:25:25)
at finalize (C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:189:14)
at Conf.afterCARead (C:\Program Files\nodejs\node_modules\npm\lib\config\load-cafile.js:14:14)
C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205
if (npm.config.get('json')) {
^
TypeError: Cannot read property 'get' of undefined
at process.errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18)
at process.emit (events.js:182:13)
at process._fatalException (internal/bootstrap/node.js:472:27)
Error: EISDIR: illegal operation on a directory, read
TypeError: Cannot read property 'get' of undefined
at errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18)
at C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js:76:20
at cb (C:\Program Files\nodejs\node_modules\npm\lib\npm.js:228:22)
at C:\Program Files\nodejs\node_modules\npm\lib\npm.js:266:24
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:83:7
at Array.forEach ()
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:82:13
at f (C:\Program Files\nodejs\node_modules\npm\node_modules\once\once.js:25:25)
at finalize (C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:189:14)
at Conf.afterCARead (C:\Program Files\nodejs\node_modules\npm\lib\config\load-cafile.js:14:14)
C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205
if (npm.config.get('json')) {
^
TypeError: Cannot read property 'get' of undefined
at process.errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18)
at process.emit (events.js:182:13)
at process._fatalException (internal/bootstrap/node.js:472:27)
from npx.
Tell me what shuld i do?
from npx.
cmd /c mklink /J "C:\Users\myname" "C:\Users\My Name"
@edwardbrowncross this is working for me as well. Thanks a lot!
from npx.
tried @edwardbrowncross method and unfortunately it broke npm completely for me
`C:\Users\My Username\Documents\Code\React>npm version
fs.js:1670
binding.stat(baseLong);
^
Error: EPERM: operation not permitted, stat 'C:\Users\myusername'
at Object.realpathSync (fs.js:1670:17)
at toRealPath (module.js:158:13)
at Function.Module._findPath (module.js:207:22)
at Function.Module._resolveFilename (module.js:536:25)
at Function.Module._load (module.js:468:25)
at Function.Module.runMain (module.js:684:10)
at startup (bootstrap_node.js:187:16)
at bootstrap_node.js:608:3
`
This exact error happens with npm <any_command>
- not posting to criticise @edwardbrowncross but just one data point that this might happen if you try that solution.
from npx.
Update: deleting the symlink file created by the mklink command but not re-updating the caches seems to have both eliminated the above error and made npx create-react-app
work
¯_(ツ)_/¯
thanks to @edwardbrowncross no thanks to computers
from npx.
D:>npm install -g
Error: EISDIR: illegal operation on a directory, read
TypeError: Cannot read property 'get' of undefined
at errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18)
at C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js:78:20
at cb (C:\Program Files\nodejs\node_modules\npm\lib\npm.js:228:22)
at C:\Program Files\nodejs\node_modules\npm\lib\npm.js:266:24
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:83:7
at Array.forEach ()
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:82:13
at f (C:\Program Files\nodejs\node_modules\npm\node_modules\once\once.js:25:25)
at finalize (C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:189:14)
at Conf.afterCARead (C:\Program Files\nodejs\node_modules\npm\lib\config\load-cafile.js:14:14)
C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205
if (npm.config.get('json')) {
^
TypeError: Cannot read property 'get' of undefined
at process.errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18)
at process.emit (events.js:182:13)
at process._fatalException (internal/bootstrap/node.js:491:27)
Error: EISDIR: illegal operation on a directory, read
TypeError: Cannot read property 'get' of undefined
at errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18)
at C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js:78:20
at cb (C:\Program Files\nodejs\node_modules\npm\lib\npm.js:228:22)
at C:\Program Files\nodejs\node_modules\npm\lib\npm.js:266:24
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:83:7
at Array.forEach ()
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:82:13
at f (C:\Program Files\nodejs\node_modules\npm\node_modules\once\once.js:25:25)
at finalize (C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:189:14)
at Conf.afterCARead (C:\Program Files\nodejs\node_modules\npm\lib\config\load-cafile.js:14:14)
C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205
if (npm.config.get('json')) {
^
from npx.
D:>npm install -g create-react-app
Error: EISDIR: illegal operation on a directory, read
TypeError: Cannot read property 'get' of undefined
at errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18)
at C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js:78:20
at cb (C:\Program Files\nodejs\node_modules\npm\lib\npm.js:228:22)
at C:\Program Files\nodejs\node_modules\npm\lib\npm.js:266:24
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:83:7
at Array.forEach ()
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:82:13
at f (C:\Program Files\nodejs\node_modules\npm\node_modules\once\once.js:25:25)
at finalize (C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:189:14)
at Conf.afterCARead (C:\Program Files\nodejs\node_modules\npm\lib\config\load-cafile.js:14:14)
C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205
if (npm.config.get('json')) {
^
TypeError: Cannot read property 'get' of undefined
at process.errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18)
at process.emit (events.js:182:13)
at process._fatalException (internal/bootstrap/node.js:491:27)
Error: EISDIR: illegal operation on a directory, read
TypeError: Cannot read property 'get' of undefined
at errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18)
at C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js:78:20
at cb (C:\Program Files\nodejs\node_modules\npm\lib\npm.js:228:22)
at C:\Program Files\nodejs\node_modules\npm\lib\npm.js:266:24
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:83:7
at Array.forEach ()
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:82:13
at f (C:\Program Files\nodejs\node_modules\npm\node_modules\once\once.js:25:25)
at finalize (C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:189:14)
at Conf.afterCARead (C:\Program Files\nodejs\node_modules\npm\lib\config\load-cafile.js:14:14)
C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205
if (npm.config.get('json')) {
^
TypeError: Cannot read property 'get' of undefined
at process.errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18)
at process.emit (events.js:182:13)
at process._fatalException (internal/bootstrap/node.js:491:27)
D:>
from npx.
I was able to fix this in Windows by creating a directory junction to my users folder that didn't have a space in it. You can run a command like this in an administrative powershell:
cmd /c mklink /J "C:\Users\myname" "C:\Users\My Name"
You can then use this junction as if it were your real user directory:
npm config set cache C:\Users\myname\AppData\Roaming\npm-cache npm config set prefix C:\Users\myname\AppData\Roaming\npm
(the above should update your user .npmrc file)
It says "Access Denied" when I use this command.
from npx.
It says "Access Denied" when I use this command.
The workaround works for me. Make sure to execute the first command in an administrative powershell (right-click, "Run as Administrator")
from npx.
It work for me to git pull
.
from npx.
Still seeing this issue while trying to use the npx command:
$ npx create-stencil ionic-pwa
Error: EPERM: operation not permitted, mkdir 'C:\Users\John'
TypeError: Cannot read property 'get' of undefined
at errorHandler (C:\Users\John Tsombakos\AppData\Roaming\npm\node_modules\npm\lib\utils\error-handler.js:205:18)
at C:\Users\John Tsombakos\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js:78:20
at cb (C:\Users\John Tsombakos\AppData\Roaming\npm\node_modules\npm\lib\npm.js:228:22)
at C:\Users\John Tsombakos\AppData\Roaming\npm\node_modules\npm\lib\npm.js:266:24
at C:\Users\John Tsombakos\AppData\Roaming\npm\node_modules\npm\lib\config\core.js:83:7
at Array.forEach (<anonymous>)
at C:\Users\John Tsombakos\AppData\Roaming\npm\node_modules\npm\lib\config\core.js:82:13
at f (C:\Users\John Tsombakos\AppData\Roaming\npm\node_modules\npm\node_modules\once\once.js:25:25)
at afterExtras (C:\Users\John Tsombakos\AppData\Roaming\npm\node_modules\npm\lib\config\core.js:173:20)
at C:\Users\John Tsombakos\AppData\Roaming\npm\node_modules\npm\node_modules\mkdirp\index.js:47:53
C:\Users\John Tsombakos\AppData\Roaming\npm\node_modules\npm\lib\utils\error-handler.js:205
if (npm.config.get('json')) {
^
TypeError: Cannot read property 'get' of undefined
at process.errorHandler (C:\Users\John Tsombakos\AppData\Roaming\npm\node_modules\npm\lib\utils\error-handler.js:205:18)
at process.emit (events.js:182:13)
at process._fatalException (internal/bootstrap/node.js:485:27)
Install for create-stencil@latest failed with code 7
Any chance of this getting fixed?
@sudip1072 - What's the point of using npx if you just installed the command globally? npx is supposed to let you run a command WITHOUT installing it globally?
from npx.
Am I reading this right, that there's a fix (#138) but until it gets merged,
npx
doesn't work on Windows (if my profile dir has a space in it)? Bummer, I just found out aboutnpx
today and got all excited to stop typing./node_modules/.bin
so much...
Latest patch appears to be #181.
from npx.
As a further data point, my prefix was set and escaped to the right value and yet I still got the reported error message.
@edwardbrowncross' work-around worked for me.
Wiki sez about junctions: "Unlike NTFS symbolic links, junction points can only link to an absolute path and only to a local volume; junction points from a local volume to a remote share are unsupported."
In other words they may not work for everybody.
from npx.
Thanks @edwardbrowncross . I confirm this works fine.
from npx.
Thanks @edwardbrowncross
node -v v8.15.0 "C:\Users\My Name" change "C:\Users\myname" ok
from npx.
For those recommending to run as admin, this opens a large security hole as it creates a new folder with admin perms, potentially blocking all other non admin apps from doing anything at all.
The correct workaround (until the code is fixed) is to make npm
think your home directory does not have a space in using @edwardbrowncross 's suggestion above.
from npx.
can anyone tell me how to fix this ????
- Open CMD in "
Administrator
" mode. npm cache clear --force
npm install
It's worked for me.
from npx.
Tried everything mentioned here, only solution for me was to change the user name
https://www.top-password.com/blog/rename-user-profile-directory-in-windows/
from npx.
I had this same issue, did a search for my .npmrc file and put this in my prefix.
prefix=${HOME}/.npm-packages
it's the general default config. In my case I accidently changed the default config path which ended up breaking it.
from npx.
CMD as administrator solved it for me
from npx.
I tried everything in this thread and nothing worked, then I installed Cmder and it magically worked...
from npx.
Try going to the file .npmrc, in "C:\Users%UserName%", and deleting it.
from npx.
I was also facing the same problem while following react tutorials. Following steps worked for me
I changed all the defaults path of node and npm from C:\Users\ {user name} to some other drive.
- Installed the node to some other drive.
- Moved npm to some other location(say D:\npm)
- Changed the paths of npm from PATH env variable
- Changed the paths of npm-cache, .global_variables, .npmrc to (D:\npm) using npm config set {command} = {path}
This will override the existing settings and set the new ones.
After this I ran the npx command shown in tutorial, and it worked.
Hope this helps.
from npx.
@carolinamaciel1 Thanks, but as I said, this is a workaround.
There is a PR request readily available, which only needs to be merged to REALLY fix this problem.
@zkat My hope is on you ;-) Any change you could merge PR #181 ?
from npx.
I was able to fix this in Windows by creating a directory junction to my users folder that didn't have a space in it. You can run a command like this in an administrative powershell:
cmd /c mklink /J "C:\Users\myname" "C:\Users\My Name"
You can then use this junction as if it were your real user directory:
npm config set cache C:\Users\myname\AppData\Roaming\npm-cache npm config set prefix C:\Users\myname\AppData\Roaming\npm
(the above should update your user .npmrc file)
Life Saver.. Love you man
I'm searching for like an hour and finally, you made it nicely, thank you so much
from npx.
Seeing the same behavior here with respect to paths with spaces. Appears to be limited to npx.
npm cache verify
has no effect.Output as follows for directory
C:\Users\Foo G. Bar
Error: EPERM: operation not permitted, mkdir 'C:\Users\Foo' TypeError: Cannot read property 'get' of undefined at errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18) at C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js:83:20 at cb (C:\Program Files\nodejs\node_modules\npm\lib\npm.js:224:22) at C:\Program Files\nodejs\node_modules\npm\lib\npm.js:262:24 at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:81:7 at Array.forEach (<anonymous>) at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:80:13 at f (C:\Program Files\nodejs\node_modules\npm\node_modules\once\once.js:25:25) at afterExtras (C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:178:20) at C:\Program Files\nodejs\node_modules\npm\node_modules\mkdirp\index.js:47:53 at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\polyfills.js:284:29 at FSReqWrap.oncomplete (fs.js:152:21)
Error: EPERM: operation not permitted, mkdir 'C:\Users\Foo' TypeError: Cannot read property 'get' of undefined at errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:213:17) at C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js:83:20 at cb (C:\Program Files\nodejs\node_modules\npm\lib\npm.js:215:22) at C:\Program Files\nodejs\node_modules\npm\lib\npm.js:253:24 at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:81:7 at Array.forEach (native) at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:80:13 at f (C:\Program Files\nodejs\node_modules\npm\node_modules\once\once.js:25:25) at afterExtras (C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:178:20) at C:\Program Files\nodejs\node_modules\npm\node_modules\mkdirp\index.js:47:53 C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:213 if (npm.config.get('json')) { ^ TypeError: Cannot read property 'get' of undefined at process.errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:213:17) at emitOne (events.js:115:13) at process.emit (events.js:210:7) at process._fatalException (bootstrap_node.js:329:26) Install for prefix@latest failed with code 7 Error: EPERM: operation not permitted, mkdir 'C:\Users\Foo' TypeError: Cannot read property 'get' of undefined at errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:213:17) at C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js:83:20 at cb (C:\Program Files\nodejs\node_modules\npm\lib\npm.js:215:22) at C:\Program Files\nodejs\node_modules\npm\lib\npm.js:253:24 at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:81:7 at Array.forEach (native) at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:80:13 at f (C:\Program Files\nodejs\node_modules\npm\node_modules\once\once.js:25:25) at afterExtras (C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:178:20) at C:\Program Files\nodejs\node_modules\npm\node_modules\mkdirp\index.js:47:53 C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:213 if (npm.config.get('json')) { ^ TypeError: Cannot read property 'get' of undefined at process.errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:213:17) at emitOne (events.js:115:13) at process.emit (events.js:210:7) at process._fatalException (bootstrap_node.js:329:26) Install for cowsay@latest failed with code 7
run cmd in administrator then npm cache clear --force
from npx.
Moo
PS C:\dev> npx cowsay hi
Error: EPERM: operation not permitted, mkdir 'C:\Users\Lewis'
TypeError: Cannot read property 'loaded' of undefined
at exit (C:\Users\Lewis Moten\AppData\Roaming\npm\node_modules\npm\lib\utils\error-handler.js:98:27)
at errorHandler (C:\Users\Lewis Moten\AppData\Roaming\npm\node_modules\npm\lib\utils\error-handler.js:216:3)
at C:\Users\Lewis Moten\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js:77:20
at cb (C:\Users\Lewis Moten\AppData\Roaming\npm\node_modules\npm\lib\npm.js:225:22)
at C:\Users\Lewis Moten\AppData\Roaming\npm\node_modules\npm\lib\npm.js:263:24
at C:\Users\Lewis Moten\AppData\Roaming\npm\node_modules\npm\lib\config\core.js:83:7
at Array.forEach (<anonymous>)
at C:\Users\Lewis Moten\AppData\Roaming\npm\node_modules\npm\lib\config\core.js:82:13
at f (C:\Users\Lewis Moten\AppData\Roaming\npm\node_modules\npm\node_modules\once\once.js:25:25)
at afterExtras (C:\Users\Lewis Moten\AppData\Roaming\npm\node_modules\npm\lib\config\core.js:173:20)
C:\Users\Lewis Moten\AppData\Roaming\npm\node_modules\npm\lib\utils\error-handler.js:98
var doExit = npm.config.loaded ? npm.config.get('_exit') : true
^
TypeError: Cannot read property 'loaded' of undefined
at exit (C:\Users\Lewis Moten\AppData\Roaming\npm\node_modules\npm\lib\utils\error-handler.js:98:27)
at process.errorHandler (C:\Users\Lewis Moten\AppData\Roaming\npm\node_modules\npm\lib\utils\error-handler.js:216:3)
at process.emit (events.js:189:13)
at process._fatalException (internal/bootstrap/node.js:496:27)
Install for cowsay@latest failed with code 7
PS C:\dev> npx -v; npm -v; node -v
6.9.0
6.9.0
v10.15.3
PS C:\dev> npm i cowsay -g
C:\Users\Lewis Moten\AppData\Roaming\npm\cowsay -> C:\Users\Lewis Moten\AppData\Roaming\npm\node_modules\cowsay\cli.js
C:\Users\Lewis Moten\AppData\Roaming\npm\cowthink -> C:\Users\Lewis Moten\AppData\Roaming\npm\node_modules\cowsay\cli.js
+ cowsay@1.4.0
added 10 packages from 3 contributors in 1.596s
PS C:\dev> npx cowsay hi
____
< hi >
----
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
PS C:\dev>
from npx.
Same issue
from npx.
It's a escape error, this escape for / path works for me:
"\/"
platform is win10
Escaping the slash this way worked for me. Thank you very much. I'm also on windows 10. I do not have a space in my user name.
This problem started for me after calling this:
npm config -g set cafile
After the above I tried calling this and then I saw the error:
npm config -g set cafile C:\Users\XXXXXXXX\git-certs\cert_XXXXXXXX.pem
Error: EISDIR: illegal operation on a directory, read
TypeError: Cannot read property 'get' of undefined
at errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18)
at C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js:78:20
at cb (C:\Program Files\nodejs\node_modules\npm\lib\npm.js:228:22)
at C:\Program Files\nodejs\node_modules\npm\lib\npm.js:266:24
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:83:7
at Array.forEach (<anonymous>)
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:82:13
at f (C:\Program Files\nodejs\node_modules\npm\node_modules\once\once.js:25:25)
at finalize (C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:189:14)
at Conf.afterCARead (C:\Program Files\nodejs\node_modules\npm\lib\config\load-cafile.js:14:14)
C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205
if (npm.config.get('json')) {
^
TypeError: Cannot read property 'get' of undefined
at process.errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18)
at process.emit (events.js:189:13)
at process._fatalException (internal/bootstrap/node.js:496:27)
Error: EISDIR: illegal operation on a directory, read
TypeError: Cannot read property 'get' of undefined
at errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18)
at C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js:78:20
at cb (C:\Program Files\nodejs\node_modules\npm\lib\npm.js:228:22)
at C:\Program Files\nodejs\node_modules\npm\lib\npm.js:266:24
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:83:7
at Array.forEach (<anonymous>)
at C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:82:13
at f (C:\Program Files\nodejs\node_modules\npm\node_modules\once\once.js:25:25)
at finalize (C:\Program Files\nodejs\node_modules\npm\lib\config\core.js:189:14)
at Conf.afterCARead (C:\Program Files\nodejs\node_modules\npm\lib\config\load-cafile.js:14:14)
C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205
if (npm.config.get('json')) {
^
TypeError: Cannot read property 'get' of undefined
at process.errorHandler (C:\Program Files\nodejs\node_modules\npm\lib\utils\error-handler.js:205:18)
at process.emit (events.js:189:13)
at process._fatalException (internal/bootstrap/node.js:496:27)
This line in my .npmrc file fixed it for me:
cafile="C:\/Users\/XXXXXXXXX\/git-certs\/cert_XXXXXXX.pem"
from npx.
it's may be helpful
https://alastaircrabtree.com/fixing-intermittant-eperm-operation-not-permitted-on-npm-install/
from npx.
@manojkumardesai Thank you
npm install -g create-react-app
npx create-react-app
worksThis work for me too
Resolvido com esse código.
from npx.
I found these solutions, which worked for me!
You need to change the cache to a location without spaces.
Thank you my lord! Saved a day of headaches!
from npx.
Related Issues (20)
- How to tell what binary gets executed?
- Accessing contents of a binary package
- npx -p touch nodetouch gulpfile.js
- --no-install should be default behavior HOT 1
- Won't traverse to parents if dir has package.json?
- Is this project dead? HOT 6
- Scoped packages, with "install" in the title, trigger "npm install"
- TypeError: Cannot read property 'loaded' of undefined
- Feature Request: support --prefix like npm, to run npx in another base directory
- Too many vulnerabilities HOT 4
- `---no-install` also when the package exists
- Cannot find module 'internal/util/types' when doing npm install -g npx
- npx rimraf fails as part of prepare script when publishing
- After removing space in path I'm getting this issue...
- Benefit of this over npm run? HOT 5
- Why doesn't npx work with @vue/cli?
- Webpack-cli postinstall script fails to run
- Minor typo on auto-fallback.js
- is there a way to use npx to run local version of node?
- cannot run "npx @babel/cli" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from npx.