npm install errors with Error: ENOENT, chmod
Asked Answered
I

48

185

I am trying to globally install an npm module I just published. Every time I try to install, either from npm or the folder, I get this error.

npm ERR! Error: ENOENT, chmod '/usr/local/lib/node_modules/takeapeek/lib/cmd.js'
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <[email protected]>

npm ERR! System Linux 3.8.0-19-generic
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "takeapeek"
npm ERR! cwd /home/giodamlio
npm ERR! node -v v0.10.6
npm ERR! npm -v 1.3.6
npm ERR! path /usr/local/lib/node_modules/takeapeek/lib/cmd.js
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/giodamlio/npm-debug.log
npm ERR! not ok code 0

I am using sudo and I have triple checked everything in the package everything should work. I did some searching around, and saw a couple of similer cases none of which have been resolved. Here is what I tried.

  • Upgrade npm (sudo npm install -g npm)
  • Clear the global npm cache (sudo npm cache clear)
  • Clear the user npm cache (npm cache clear)

I noticed that the error had to do with the file I am linking to the path, specifically when npm tried to do a chmod. That shouldn't be a problem, my lib/cli.js has normal permissions, and npm has superuser permissions during this install.

After digging through the npm docs I found an option that would stop npm from making the bin links(--no-bin-links), when I tried the install with it, it worked fine.

So what's the deal? Is this some weird fringe case bug that has no solution yet?

Edit: For reference, here is the module I uploaded

Iatry answered 1/8, 2013 at 9:49 Comment(10)
is your package using node-gyp? I think that no-bin-links call is related if so.Bowknot
Nope, no native code in the module. Here is the module source for reference.Iatry
The --no-bin-links just stops npm from symlinking files in the package.json's bin hash to the path on global install.Iatry
Argh, I've definitely run into this before but I can't remember why... will let you know if it pops into my head.Bowknot
@Bowknot Thanks, its really quite frustrating, I have checked everything a billion times, but I still can't help feeling I've missed something stupid simple. That or maybe it is some weird bug.Iatry
It's something with install paths for dependent libraries I'd bet but that doesn't seem to be relevant for your lib, so I dunno.Bowknot
Is this on Linux? Maybe try running "strace npm install ...". Watch for stat or open calls against cmd.js. That might show something interesting, like maybe some directory prefix that isn't displayed.Brittne
are you sure it's not npm cache clean instead?Kier
See also: https://mcmap.net/q/137401/-cannot-make-npm-install-g-work-for-my-packageWendeline
in my case, the scenario is different but I had the same bug npm ERR! code ENOENT. the solution was cd .. && ls because I don't know how but I deleted the directory but bash terminal still was on that directory so this is why. so by using cd.. I go outside the deleted repo, then with ls I checked if I was in the correct directory or not. if you are in the correct one then you can copy and paste your npm create and what you want fine. this is just what happened to me... your scenario is different of course, this was only my experience. so TLDR: check if you are in the correct 📂Pomelo
S
179

Ok it looks like NPM is using your .gitignore as a base for the .npmignore file, and thus ignores /lib. If you add a blank .npmignore file into the root of your application, everything should work.

A better, more explicit approach is to use an allow-list rather than a disallow-list, and use the "files" field in package.json to specify the files in your package.

[edit] - more info on this behaviour here: https://docs.npmjs.com/cli/v7/using-npm/developers#keeping-files-out-of-your-package

Scag answered 2/8, 2013 at 15:3 Comment(8)
Darn, that must be it. That seems like a bit of a confusing way of doing things. Not at a computer now, but I will try it in a few hours.Iatry
Yea it took me a while to figure it out. Some guys more experienced than I hinted this on the reddit thread.Scag
I tested this using your repo and installing locally using npm install ../takeapeek and adding the blank .npmignore file works.Scag
3 hours of frustration came down to one line in my .gitignore that was freaking out the npm install -g. Insane.Topical
'type NUL > .npmignore' for windowsAccipitrine
As of npm@5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent, use 'npm cache verify' instead.Bihari
remove package-lock.json fileCheadle
also - worth of shot - try running it as adminStroh
W
130

I ran into a similar problem,

npm cache clean

solved it.

Withdrawn answered 3/5, 2014 at 15:6 Comment(1)
I tried npm cache verify and it worked. thanks for hint.Kulp
V
26

I was getting this error on npm install and adding .npmignore did not solve it.

Error: ENOENT, stat 'C:\Users\My-UserName\AppData\Roaming\npm'

I tried going to the mentioned folder and it did not exist. The error was fixed when I created npm folder in Roaming folder.

This is on Windows 8.1

Vespers answered 15/11, 2014 at 23:8 Comment(2)
Thx you for saving people time!Spaulding
On Windows 10 THIS was also the answer ! THXPompano
C
16

This problem somehow arose for me on Mac when I was trying to run npm install -g bower. It was giving me a number of errors for not being able to find things like graceful-fs. I'm not sure how I installed npm originally, but it looks like perhaps it came down with node using homebrew. I first ran

brew uninstall node

This removed both node and npm from my path. From there I just reinstalled it

brew install node

When it completed I had node and npm on my path and I was able to run

rm -rf ~/.npm
npm install -g bower

This then installed bower successfully.

Updating the brew formulas and upgrading the installs didn't seem to work for me, I'm not sure why. The removal of the .npm folder was something that had worked for other people, and I had tried it without success. I did it this time just in case. Note also that neither of the following solved the problem for me, although it did for others:

npm cache clean
sudo npm cache clean
Congratulant answered 9/1, 2014 at 23:52 Comment(0)
P
12

I encountered similar behavior after upgrading to npm 6.1.0. It seemed to work once, but then I got into a state with this error while trying to install a package that was specified by path on the filesystem:

npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename

The following things did not fix the problem:

  • rm -rf node_modules
  • npm cache clean (gave npm ERR! As of npm@5, the npm cache self-heals....use 'npm cache verify' instead.)
  • npm cache verify
  • rm -rf ~/.npm

How I fixed the problem:

  • rm package-lock.json
Pet answered 12/7, 2018 at 12:50 Comment(0)
F
10

I got this error while trying to install a grunt plugin. i found i had an outdated version of npm and the error went away after updating npm to the latest version

npm install -g npm
Finfoot answered 4/4, 2015 at 16:13 Comment(0)
S
6

Delete package-lock.json file then run npm install

Sergent answered 13/4, 2021 at 6:0 Comment(0)
C
5

I had the same problem, and just found a handling not mentioned here. Though I'd contribute to the community:

npm install -g myapp was not copying the bin directory. I found this to be because I did not include it in the files in my package.json

"files": [
  "lib",
  "bin" // this was missing
]
Channel answered 11/6, 2015 at 0:26 Comment(3)
Got the same issue and this answer was the only good fix for me. The reason was I got the files key in my package.json with some entries like index.js and LICENSE, but not the bin folder. So it works if there is no files key at all, or if there is a files key AND the bin folder into.Mispickel
Thanks, this helped me get unstuck. Once you pointed out that the bin directory wasn't included in files I thought "oh! of course!". Then I went back to the docs to see if I missed it and it's not mentioned (at least not in the npm blog post I was reading through). At least I'm not crazy :P. Thanks for the help!Nugent
Thanks. I've updated my answer to mention the "files" approach which imo is a better approach.Scag
S
4

I was getting a similar error on npm install on a local installation:

npm ERR! enoent ENOENT: no such file or directory, stat '[path/to/local/installation]/node_modules/grunt-contrib-jst'

I am not sure what was causing the error, but I had recently installed a couple of new node modules locally, upgraded node with homebrew, and ran 'npm update -g'.

The only way I was able to resolve the issue was to delete the local node_modules directory entirely and run npm install again:

cd [path/to/local/installation]
npm rm -rdf node_modules
npm install
Sometime answered 31/12, 2015 at 0:40 Comment(0)
T
4

I have a similar problem specifucally : ERR! enoent ENOENT: no such file or directory, chmod 'node_modules/npm/node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-conv I tried all above solutions but no luck. I was using vagrant box, and the project was in a shared folder. The problems seems to be only there, when I move the project to another not shared folder (woth host), voila! problem solved. Just in case another person was using also vagrant

Theretofore answered 2/3, 2017 at 21:5 Comment(1)
You waked me from a nightmare, tnx! I have 2 additions: 1.) Stop using npm, use Yarn. 2.) Run npm from your HOST machine and not the VM.Antiscorbutic
L
4

I got the simple solution, just clear the npm cache.

sudo npm cache clear --force

then remove the node_modules & package-lock.json

sudo rm -rf node_modules
sudo rm -rf package-lock.json

Now install the dependencies module using npm and start the server

npm install && npm start
Leech answered 17/7, 2021 at 2:38 Comment(0)
O
3

I got a similar error message when trying to npm install a bunch of dependencies. Turns out some of them fail to install on Debian/Ubuntu because they expect /usr/bin/node to be the node executable. To fix, you need do

sudo ln -s nodejs /usr/bin/node 

or better yet,

sudo apt-get install nodejs-legacy

For more info: https://mcmap.net/q/48974/-cannot-install-packages-using-node-package-manager-in-ubuntu

Occam answered 19/2, 2015 at 6:26 Comment(0)
D
2

I think your compiled coffee script is missing from the published npm package. Try writing a prepublish command.

Drin answered 1/8, 2013 at 23:34 Comment(2)
Nope, the lib folder was there when I published it. Besides, I get the same error when I try to install from the local folder. Even when the lib folder is there.Iatry
@Iatry I agree with ryan on this one. The error is saying takeapeek/lib/cmd.js does not exist. Even though the lib folder might be 'there' when you publish, it's not going to be 'there' when you install via npm unless it's part of the repository, or unless you use prepublish to create it.Scag
P
2

In my case (multiple code ENOENT errno 34) problem was with ~/.npm/ directory access. Inside it there were some subdirs having root:root rights, which were causing problems while I run commands as normal user (without sudo). So I changed ownership of all subdirs and files inside ~/.npm/ dir into my local user and group. That did the trick on my Ubuntu (on Mac should work too).

$ sudo chown yourusername.yourgroupname ~/.npm/ -R

You should know your user name, right? If no then run $ whoami and substitute your group name with it too, like this:

$ sudo chown johnb.johnb ~/.npm/ -R

EDIT:

Test case:

From my local account /home/johnb I npm-installed globally some generator for yeoman, like this:

$ sudo npm install -g generator-laravel

Problem nature:

Above action caused some dependencies being installed inside ~/.npm/ dir, having root:root ownership (because of sudo ...). Evidently npm does not run as local user (or change dependencies subdirs ownership afterwards) when pulling dependencies and writing them to a local user subdir ~/.npm/. As long as npm would be so careless against fundamental unix filesystem security issues the problem would reoccur.

Solution:

  1. Continuosly check if ~/.npm/ contains subdirs with ownership (and/or permissions) other than your local user account, especially when you install or update something with sodo (root). If so, change the ownership inside ~/.npm/ to a local user recursively.

  2. Ask npm, bower, grunt, ... community that they address this issue as I described it above.

Prostration answered 28/5, 2014 at 22:10 Comment(0)
W
2

Had a similar Issue but I was in wrong directory please cross check the path of thee file & the run npm start

Westerfield answered 2/5, 2022 at 3:1 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Boughton
D
2
  1. npm uninstall -g create-react-app

  2. npx clear-npx-cache

    then

  3. npx create-react-app app-name

Digress answered 19/4, 2023 at 20:2 Comment(0)
F
1

I tried all the stuff I found on the net (npm cache clear and rm -rf ~/.npm), but nothing seems to work. What solved the issue was updating node (and npm) to the latest version. Try that.

Folie answered 24/5, 2014 at 16:49 Comment(0)
R
1

In Windows I had a similar error. Search paste App Data and search for the string npm.

I replaced the string 'npm' (including quotes) with 'npm.cmd' in both atlasboard\lib\package-dependency-manager.js and atlasboard\lib\cli\commands.js. That fixed the problem.

Rata answered 27/10, 2014 at 17:20 Comment(0)
C
1

The same error during global install (npm install -g mymodule) for package with a non-existing script.

In package.json:

    ...
    "bin": {
      "module": "./bin/module"
    },
    ...

But the ./bin/module did not exist, as it was named modulejs.

Cardin answered 3/11, 2014 at 12:40 Comment(0)
S
1
  1. Install latest version of node
  2. Run: npm cache clean
  3. Run: npm install cordova -g
Shoran answered 10/1, 2017 at 3:29 Comment(0)
S
1

You can get this error if your node.js is corrupted somehow as well. I fixed this error by uninstall/restart/install node.js completely and it fixed this error, along with the three other mysterious errors that are thrown.

Snowdrop answered 26/5, 2018 at 4:4 Comment(0)
R
1

Be careful with invalid values for keys "directories" and "files" in package.json

If you start with a new application, and you want to start completely blank, you have to either start in a complete empty folder or have a valid package.json file in it.

If you do not want to create a package.json file first, just type: npm i some_package

Package with name "some_package" should be installed correctly in a new sub folder "node_modules".

If you create a package.json file first, type: npm init Keep all the defaults (by just clicking ENTER), you should end up with a valid file.

It should look like this:

{
  "name": "yourfoldername",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC"
}

Note that the following keys are missing: "directories", "repository" and "files". It looks like if you use incorrect values for "directories" and/or "files", you are not able to install the package. Leaving these keys out, solved the issue for me.

Also note key "main". This one is present, but it does contain an invalid value. No file "index.js" exists (yet). You can safely remove it.

Now type: npm i some_package and package with name "some_package" should be installed correctly in a new sub folder "node_modules".

Roaring answered 16/10, 2018 at 13:16 Comment(0)
P
1

Had a similar error with npm in a docker container for webpack. The issue was caused by the --user command line argument of docker run, because the given user and group in there somehow messed up the rights on the local volume. Hope this helps someone :)

Petronel answered 16/3, 2020 at 21:28 Comment(0)
G
1

Tried nearly everything then finally this:

Simply remove node_modules then run 'npm install' again

Grown answered 3/5, 2020 at 15:8 Comment(0)
O
1

I had the same problem on ubuntu, and got rid of the problem by closing the terminal and opening a new one.

Orthman answered 3/3, 2021 at 11:50 Comment(1)
this worked with me on widows after I deleted my node_modules and reinstalled it (idk if that was needed), weird error and weird solutionRiccio
M
1

It's because there is no package.json and only package-lock.json

Try: npm init --yes

Manon answered 3/7, 2021 at 18:14 Comment(0)
H
0

I had a similar issue with a different cause: the yo node generator had added "files": ["lib/"] to my package.json and because my cli.js was outside of the lib/ directory, it was getting skipped when publishing to npm.

(Yeoman issue at https://github.com/yeoman/generator-node/issues/63 it should be fixed soon.)

Hamfurd answered 6/11, 2014 at 16:51 Comment(0)
G
0

I was getting the error "Error: ENOENT, stat 'C:\Users\userName\AppData\Roaming\npm'. But there was no such directory. Created the directory and the npm install started working

Geosphere answered 29/1, 2015 at 2:39 Comment(0)
G
0

I recently upgraded to node 4.2.1 on a Windows 7 x64 machine. When running

npm install -g bower

I got a similar error:

npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\THE_USERNAME\AppData\Local\Temp\npm-THE_HASH'

Thinking it was related to the AppData path, I played around with

npm config edit

and

npm config edit --global

to change the prefix, cache and tmp fields but received the same error with the new paths:

npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\THE_USERNAME\npm-temp\npm-THE_HASH'

All commands were run as Administrator, so I had full permissions.

Then I thought there were some issues with existing files so I ran:

npm cache clean

But got the same error. However, there were still some temp files lying around. Manually removing all temp data with cygwin finally fixed the problem for me:

rm -rf bower bower.cmd node_modules etc

If you only have Windows cmd, you could use something like

rmdir /S THE_TEMP_DIR

to remove all subdirectories (although if you have deeply nested node dependencies, this is notoriously problematic)

So, maybe there is some issues with upgrading npm and having versions of bower or other packages hanging around. In my case that seemed to be the problem

Glasswort answered 30/10, 2015 at 16:45 Comment(0)
F
0

While installing ionic I got below error

115648 error enoent ENOENT: no such file or directory, rename 'C:\Users\UserName\AppData\Roaming\npm\node_modules.staging\ansi-b11f0c4b' -> 'C:\Users\UserName\AppData\Roaming\npm\node_modules\ionic\node_modules\cordova-lib\node_modules\ansi'

There was no folder called ansi at that path. I created it there and it installed correctly.

Fireplug answered 6/1, 2017 at 17:50 Comment(0)
O
0

If you tried to "make install" in your project directory with this error you can try it:

rm -rf ./node_modules
npm cache clear
npm remove sails

then you can try to "make install"

If you have the "npm ERR! enoent ENOENT: no such file or directory, chmod '.../djam-backend/node_modules/js-beautify/js/bin/css-beautify.js'" then you can try to install some previous version of the js-beautify, more comments: https://github.com/beautify-web/js-beautify/issues/1247

"dependencies": {
  ...
  "js-beautify": "1.6.14"
  ...
}

and the run "make install". It seem works in case if you have not other dependencies that requires higher version (1.7.0) in this case you must downgrade this packages also in the packages.json.

or

Origami answered 18/9, 2017 at 10:29 Comment(0)
B
0

None of the above worked for me. But yarn install worked, then npm i started working. Not sure what yarn fixed, but quick and easy solution!

Bayle answered 19/10, 2017 at 21:36 Comment(0)
S
0

First do

 npm rm -rdf node_modules

then do

npm install

After that install whatever files you want to add

Shifty answered 27/8, 2019 at 8:47 Comment(0)
P
0

Closing Android Studio solved this error for me.

Poche answered 11/3, 2021 at 22:49 Comment(0)
S
0

node_modules directory could be opened in another application like "neatbeans" and file creation/renaming is forbidden

ridiculously -- on windows 10 machine -- that was my only problem

Shalom answered 8/7, 2021 at 10:9 Comment(0)
A
0

First install mongoose dependencies

npm install mongoose

npm install

Antiphrasis answered 10/11, 2021 at 10:0 Comment(0)
B
0

Solve the problem simply because the modification to the file is locked, or you have locked the permissions on the partition through a specific protection program, and evidence of that is to create the project in another file or another place on the hard drive

Bethel answered 12/2, 2022 at 21:34 Comment(0)
H
0

Remove node_modules, package-lock.json and run npm install

rm -rf node_modules
rm -rf package-lock.json
npm install
Hephzipah answered 16/2, 2022 at 9:5 Comment(0)
P
0

I'm also having trouble with React 17.0.2, because right now by default installation is React 18.

How I'm dealing with this node/npm error is by:

  1. uninstall and installing back nodejs
  2. Don't delete the package-lock.json
  3. run: npm install

It works for me: Windows 10, npm 8.6.0, node v16.14.2

Phi answered 12/4, 2022 at 15:44 Comment(1)
This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. To get notified when this question gets new answers, you can follow this question. Once you have enough reputation, you can also add a bounty to draw more attention to this question. - From ReviewGennygeno
S
0

Following commands worked for me :

           npm cache clean --force
           npm rm -rdf node_modules
           rm -rf package-lock.json
           npm install -g @sencha/ext-gen
           npm install
Stopover answered 12/7, 2022 at 11:49 Comment(0)
G
0

To resolve the following error, please ensure you are running npm run start command in the right directory on your terminal.

$ npm run start
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path E:\YOUR_PROJECT_FOLDER\example-frontend/package.json
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, open 'E:\YOUR_PROJECT_FOLDER\example-frontend\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
Generalization answered 4/8, 2022 at 7:30 Comment(0)
M
0

I got the same error until I discovered I was running "npm start" in the wrong directory. After that, it worked well when I navigated to the correct directory by cd <directory-name>.

enter image description here

Milo answered 4/9, 2022 at 11:44 Comment(0)
A
0
  • Delete node modules
  • Delete package-lock.json
  • sudo npm install
Ashliashlie answered 1/3, 2023 at 14:48 Comment(0)
R
0

In VS code there is run option in the bottom left, to resolve this issue, click that and select Node.js and then select "Run Script: Start (React)"

1

2

Reticule answered 17/6, 2023 at 4:35 Comment(0)
I
0

This is the error i face when typing npm install

npm ERR! code ENOENT
npm ERR! syscall stat npm ERR! path C:\Users\GENERAL STORES\AppData\Local\npm-cache_cacache\content-v2\sha512\2d\61\54631522b961740001938687df5b59f84c915a9faabb576d7e36f12c51fb39360a1cd65623322a750725d670d672973c1a5d3c558a18def90f27ddf61d79
npm ERR! errno ENOENT
npm ERR! enoent Invalid response body while trying to fetch https://registry.npmjs.org/normalize-range: ENOENT: no such file or directory, stat 'C:\Users\GENERAL STORES\AppData\Local\npm-cache_cacache\content-v2\sha512\2d\61\54631522b961740001938687df5b59f84c915a9faabb576d7e36f12c51fb39360a1cd65623322a750725d670d672973c1a5d3c558a18def90f27ddf61d79'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in: C:\Users\GENERAL STORES\AppData\Local\npm-cache_logs\2024-01-08T11_04_18_446Z-debug-0.log

to solve it, i commented /node_modules in the .gitignore file like this:

/.phpunit.cache
# /node_modules
/public/build
/public/hot
/public/storage
/storage/*.key
/vendor
...

then retype the command npm install

Incendiary answered 8/1 at 11:26 Comment(0)
C
-1

I have came across similar issue, clearing cache, deleting node_modules and reinstalling didn't work, so upgrading the node version to latest one worked for me.

sudo npm install n -g

then

sudo n stable
Cormophyte answered 12/5, 2021 at 17:31 Comment(0)
M
-2
Creating a new React app in C:\Users\CM\Downloads\react\github-profile.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...

npm ERR! path C:\Users\CM\AppData\Roaming\npm-cache_cacache\content- 

v2\sha512\36\c6\c3e97514319bc1c6d40026e58325e782e1016c996b1fa335b1
0893d67f7339e4af62bb688c0da2aaca839d4c9d51e2eb015eec65545008a3cad93d00f806

npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall lstat
npm ERR! Error: EPERM: operation not permitted, lstat 
'C:\Users\CM\AppData\Roaming\npm-cache_cacache\content- 
v2\sha512\36\c6\c3e97514319bc1c6d40026e58325e782e1016c996
b1fa335b10893d67f7339e4af62bb688c0da2aaca839d4c9d51e2eb015eec6
5545008a3cad93d00f806'
npm ERR! { [Error: EPERM: operation not permitted, lstat 
'C:\Users\CM\AppData\Roaming\npm-cache_cacache\content- 
v2\sha512\36\c6\c3e97514319bc1c6d40026e58325e782e1016c996b1f 
a335b10893d67f7339e4af62bb688c0da2aaca839d4c9d51e2eb015eec6554500
8a3cad93d00f806']

npm ERR! cause:
npm ERR! { Error: EPERM: operation not permitted, lstat 
'C:\Users\CM\AppData\Roaming\npm-cache_cacache\content- 
v2\sha512\36\c6\c3e97514319bc1c6d40026e58325e782e1016c996b1
fa335b10893d67f7339e4 
af62bb688c0da2aaca839d4c9d51e2eb015eec65545008a3cad93d00f806'
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'lstat',
npm ERR! path:
npm ERR! 'C:\Users\CM\AppData\Roaming\npm-cache\_cacache\content- 


npm ERR! stack:
npm ERR! 'Error: EPERM: operation not permitted, lstat 
'C:\Users\CM\AppData\Roaming\npm-cache\_cacache\content- 
v2\sha512\36\c6\c3e97514319bc1c6d40026e58325e782e1016c996
b1fa335b10893d67f7339e4af62bb688c0da2aaca839d4c9d51e2eb015
eec65545008a3cad93d00f806'',
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'lstat',
npm ERR! path:
npm ERR! 'C:\Users\CM\AppData\Roaming\npm-cache\_cacache\content- 
v2\sha512\36\c6\c3e97514319bc1c6d40026e58325e782e1016c996b1fa335
b10893d67f7339e4af62bb688c0da2aaca839d4c9d51e2eb015eec65545008a3cad93
d00f806',
npm ERR! parent: 'postcss-image-set-function' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a
text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double- 
check thenpm ERR! permissions of the file and its containing directories, or 
try  running

npm ERR! the command again as root/Administrator (though this is not 
recommended).
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\CM\AppData\Roaming\npm-cache_logs\2019-03-22T10_
27_19_722Z-debug.log


Aborting installation.
npm install --save --save-exact --loglevel error react react-dom react- 
scripts   has failed.

Deleting generated file... node_modules
Deleting generated file... package.json
Deleting GitHub-profile/ from C:\Users\CM\Downloads\reactDone.``

i was facing similar error but i tried to run create-react-app command many times and finally it was created , this was the problem with my internet connection. check your internet connection

Murdocca answered 22/3, 2019 at 10:50 Comment(0)
A
-17

Please try this

SET HTTP_PROXY=<proxy_name>

Then try that command.It will work

Arceliaarceneaux answered 2/1, 2014 at 12:48 Comment(1)
where do I put this?Hardenberg

© 2022 - 2024 — McMap. All rights reserved.