Babel Install Please Try Running This Command Again as Adminstrator as Root

Npm Delight effort using this command once again every bit root/administrator

  • Home
  • Question
  • Npm Please try using this command over again as root/administrator

I've been desperately trying to install modules using node.js but it e'er fails getting packages with npm.

I logged in equally Administrator and used powershell/cmd with "run as administrator". I likewise had bug with the registry so I used npm set up registry http://registry.npmjs.org/

I tried everything... it but drives me nuts.

Here are the errors:

npm ERR! Please endeavour running this control again as root/Administrator.

              npm ERR! System Windows_NT 6.2.9200 npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Plan Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "generator-knockout" npm ERR! cwd D:\Sergiu\Knockout Test npm ERR! node -five v0.10.26 npm ERR! npm -v i.4.3 npm ERR! path D:\Sergiu\Knockout Test\node_modules\generator-knockout\node_modules\yeoman-generator\node_modules\tar\node_modules\block-stream\cake-stream.js npm ERR! fstream_path D:\Sergiu\Knockout Exam\node_modules\generator-knockout\node_modules\yeoman-generator\node_modules\tar\node_modules\block-stream\block-stream.js npm ERR! fstream_type File npm ERR! fstream_class FileWriter npm ERR! code EPERM npm ERR! errno l npm ERR! stack Error: EPERM, lstat 'D:\Sergiu\Knockout Exam\node_modules\generator-knockout\node_modules\yeoman-generator\node_modules\tar\node_modules\block-stream\cake-stream.js' npm ERR! fstream_stack C:\Program Files\nodejs\node_modules\npm\node_modules\fstream\lib\writer.js:284:26 npm ERR! fstream_stack Object.oncomplete (fs.js:107:15) npm ERR! Error: EPERM, lstat 'D:\Sergiu\Knockout Test\node_modules\generator-knockout\node_modules\yeoman-generator\node_modules\tar\node_modules\fstream\LICENSE' npm ERR!  { [Error: EPERM, lstat 'D:\Sergiu\Knockout Test\node_modules\generator-knockout\node_modules\yeoman-generator\node_modules\tar\node_modules\fstream\LICENSE'] npm ERR!   errno: fifty, npm ERR!   lawmaking: 'EPERM', npm ERR!   path: 'D:\\Sergiu\\Knockout Examination\\node_modules\\generator-knockout\\node_modules\\yeoman-generator\\node_modules\\tar\\node_modules\\fstream\\LICENSE', npm ERR!   fstream_type: 'File', npm ERR!   fstream_path: 'D:\\Sergiu\\Knockout Test\\node_modules\\generator-knockout\\node_modules\\yeoman-generator\\node_modules\\tar\\node_modules\\fstream\\LICENSE', npm ERR!   fstream_class: 'FileWriter', npm ERR!   fstream_stack: npm ERR!    [ 'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\fstream\\lib\\writer.js:284:26', npm ERR!      'Object.oncomplete (fs.js:107:fifteen)' ] } npm ERR! npm ERR! Please try running this command over again as root/Administrator.                          

This question is tagged with windows node.js npm

~ Asked on 2014-03-11 eleven:57:08

32 Answers


It turns out that you don't have to run the command again equally Ambassador, and doing and then won't gear up the problem.

Try:

  1. npm cache clean kickoff.

  2. If that doesn't fix things, take a look in %APPDATA%\npm-cache, or if you lot're using PowerShell, $env:APPDATA\npm-cache.

Afterwards cleaning the cache, you may yet exist left with remnants. Manually remove everything in that directory, and try again. This has always stock-still things for me.

As @Crazzymatt was mentioning, as of the [email protected] version and upwardly, nosotros need to employ npm enshroud verify instead of npm cache clean. Or else you will get an error equally preceding.

npm ERR! As of [electronic mail protected], the npm cache self-heals from corruption issues and information extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent, use 'npm cache verify' instead.

(Source: MSDN Blog postal service)

~ Answered on 2014-10-28 10:l:09


I solve it running as administrator cmd. Cleaning the cache npm cache clean -f And then endeavour to install the packet again

~ Answered on 2016-05-27 10:53:28


Yous should run cmd.exe as administrator.

Follow the following steps:

  • Click Start, click All Programs, and and so click Accessories.
  • Correct-click Command prompt, and then click Run equally ambassador.

~ Answered on 2015-01-10 xix:40:26


Here is how I fixed this on my Windows (seven) Dev. surround. I assume the following...

  • You are Running Command Prompt, Git Fustigate, Cmder or your favorite Concluding, equally an Administrator by right clicking
  • Privileges Permissions accept been granted for Read/Write (i.e chmod -777)

Okay, let'south get to it:

  1. Update whatsoever packages where a version bank check is returning a alert ("npm WARN"..) for example...

    npm update -g npm

    npm update -thou graceful-fs

  2. Next nosotros want to force a cache clean. This is flagged past an '--f' or '-f'..

    npm cache clean --f

  3. In Widows Explorer search for the following path

%APPDATA%\npm-cache

And Delete information technology's contents

  1. Showtime a fresh case of your Terminal, remembering to 'Correct-Click' and 'Run as Ambassador ', install the packages again.

Hope this helps someone!!

~ Answered on 2017-05-04 nineteen:18:55


I was already running the Node Command Window as Administrator. As mentioned past many above, the following control with --f (force) solved my issue.

npm cache clean -f

After the Cache Clean, the install was flawless. Encounter the screenshot for reference

~ Answered on 2017-08-thirty nineteen:25:26


~ Answered on 2017-x-04 18:20:11


If you're using TFS or any other source control for your project that sets your checked in files to readonly mode, then you gotta make sure packet.json is checked out before running npm install. I've made this fault plenty of times.

~ Answered on 2015-07-09 xiv:42:20


Hither is how I fixed the problem in Windows. I was trying to install the CLI for Angular.

  1. Plow off firewall and antivirus protections.

  2. Right click the nodejs folder (under Program Files), select Properties (scroll all the way down), click the Security tab, and click all items in the Let column (for All Arrangement Packages and any user or group that allows you to add the "allow" checkmark).

  3. Click the Windows icon. Type cmd. Right click the top result and select Run as Administrator. A command window results.

  4. Type npm cache make clean. If in that location is an mistake, shut log files or anything open up and rerun.

  5. Type npm install -chiliad @angular/cli (Or any npm install command you are using)

  6. Check the installation by typing ng –version (Or whatever you demand to verify your install)

Skilful luck! Note: If you are still having bug, check the Path in Environmental Variables. (To admission: Control Console ? Arrangement and Security ? System ? Advanced system settings ? Surroundings variables.) My path variable included the post-obit: C:\Users\Michele\AppData\Roaming\npm

~ Answered on 2017-04-02 23:54:xix


Effort post-obit steps

i. Run this control on Terminal or CMD - npm cache clean

two. Become to this folder on windows %APPDATA%\npm-enshroud And delete binder which you want to install module (Ex:- laravel-elixir) or if y'all are using PowerShell, $env:APPDATA\npm-cache

3. And then Run your command EX:- npm install laravel-elixir

~ Answered on 2016-08-08 10:x:22


I had the aforementioned trouble and I've fixed the error by cleaning the enshroud:

              npm cache make clean -f                          

~ Answered on 2019-03-30 17:10:34


I had the same problem, what I did to solve it was ran the cmd.exe every bit administrator fifty-fifty though my account was already fix as an ambassador.

~ Answered on 2014-04-10 17:33:21


This is the menstruum often happens in this example. You run a control with no admin rights, you lot get message npm ERR! Please effort running this command again as root/Ambassador.. Then you open one more CLI(cmd, powershell, bash or whatever) and don't close the previous CLI. It appears yous have ii prompts opened in the same directory. And until you close CLI which runs with no admin rights you will be continuously getting npm ERR! Delight endeavour running this command once more as root/Administrator. So close CLI which runs with no admins rights before running a new one.

Annotation: a lot of IDE has embedded CLI(Visual Studio, VS Code etc) so delight close the instance of IDE every bit well

~ Answered on 2018-04-23 xv:12:47


npm cache verify

Try for newer versions of npm.

I'm using v 5.five.1 and it's working fine.

~ Answered on 2017-eleven-03 14:54:01


If you are doing this on mac type: sudo chown -R $USER /usr/local that volition requite y'all administrative access to your files

~ Answered on 2015-06-05 19:09:53


This worked for me, if your package.json is non likewise big you tin do this:

  • Signout then signin.
  • Delete node_modules.
  • npm install again.

~ Answered on 2017-12-15 17:59:42


Deleting the global npm-cache and/or running my cmd line as admin did not piece of work for me. Also, as of npm version v.x.x, it supposedly recovers from cache corruption by itself.

This did piece of work:

1. Deleted the node_modules folder in my electric current projection.

2. Deleted the package-lock.json in my current project

three. Installed the new packet. In my instance: npm install [email protected] --save

4. Ran npm install for my current project.

Everything now works. In general, nuking node_modules and package-lock.json usually ready these "no apparent reason" bugs for me.

EDIT

I just had the aforementioned trouble once again. Merely I noticed that everything was installed correctly even though it threw the error afterward I had followed the steps outlined above. So I could just run ng serve (for Angular), and everything worked.

This sure is a weird error...

~ Answered on 2017-09-x 14:20:29


Equally a hack,

Check if the binder path it is complaining exists or not. If not, attempt creating them manually and rerun the installation, afterwards clearing the enshroud

I had success with this, when running the installation from control prompt equally an Administrator didn't work

~ Answered on 2017-09-eleven 20:40:57


I messed with this problem two times and tried all suggestions here with mediocre success.

  • Get-go fourth dimension I tried (and succeeded luckily) by:

    1. delete the node_modules binder in your project

    2. npm clean cache -f

    3. check your %APPDATA%/npm-cache and delete everything if non empty

    4. start the final as administrator (in my stance, it isnt a problem of rights, but it wont hurt if you do so)

    5. npm install then npm update

    6. you will get errors, just install every module that throws an error manually and step by step endeavour to eliminate everything whats incorrect

Withal, this method is quite frustrating and non working everytime. So try this:

  • Second time I had no luck with the steps above, then I tried to completely reinstall npm and it failed. And so I thought there must something exist incorrect with my node.js installation. My team is running 6.ten. and I had the vi.11. and tried information technology with the half-dozen.10. with no luck.

    1. So I completely wiped everything off my system. Deleted all node modules, checked every path where node or npm could be and cleaned my organisation.

    2. Then I installed newest viii.i.3

    3. Deleted my project and cloned information technology to a complete different directory.

    4. Now I installed and updated everything with npm install npm update

    5. Then I compiled with simply ii modules missing and installed them manually

Tadaaaaa, its working now. So all in all information technology was a problem with node.js. I recommend to everyone who runs into this problem: Attempt unlike node versions! And make clean Absolute everything.

~ Answered on 2017-07-06 14:02:38


As my last resort with this mistake I created a fresh windows 10 virtual machine and installed the latest nodejs (v6). Simply at that place was a host of other "ERRs!" to piece of work through.

I had to run npm cache clean --strength which ironically will give you a message that reads "I sure hope you lot know what you are doing". That seems to accept worked.

It doesn't solve the issue on my main Dev auto. I'm canning nodejs as I found over the final few years that you spend more time on fixing it rather than on actual development. I had fewer issues with node on linux ubuntu 14.04 if that's any help.

~ Answered on 2017-08-26 19:05:49


$ npm cache clean
npm ERR! Every bit of [email protected], the npm cache self-heals from corruption bug and information extracted from the cache is guaranteed to be valid. If you lot want to make sure everything is consistent, use 'npm enshroud verify' instead.

I tried running npm cache verify with admin rights and it worked after that.

~ Answered on 2017-x-31 10:50:09


What helped me on Windows x was just ticking off "Read Only" of project node_modules.

~ Answered on 2017-04-15 15:03:40


  1. Close the IDE
  2. Close the node terminals running ng serve or npm start
  3. Get to your project folder/node_modules and meet you if can find the package that you are trying to install
  4. If yous discover the package y'all are searching then delete packet folder
  5. In instance, this is your 1st npm install so skip pace 4 and delete everything inside the node_modules. If yous don't observe node_modules then create one binder in your projection.
  6. Open the concluding in admin mode and do npm install.

That should fix the effect hopefully

~ Answered on 2017-12-21 09:43:12


FINALLY Got this working after 4 hours of installing, uninstalling, updating, apathetic blah.

The only thing that did it was to utilise an older version of node v8.9.1 x64

This was a PC windows 10.

Hope this helps someone.

~ Answered on 2018-03-21 05:01:16


A solution that worked, is to close all PowerShell and cmd instances. Start PowerShell/cmd once again every bit administrator and things seem to work.

This can happen if you're doing react-native and the node.js cmd is open in the background.

~ Answered on 2018-08-14 00:51:ten


Too recall to finish all other npm commands e.g. npm run dev-server.

~ Answered on 2018-07-24 09:23:47


For those doing this on a MAC. Simply put sudo in front of the command. It volition ask y'all for your countersign and so run fine. Cheers

~ Answered on 2020-05-25 08:14:02


On windows x, npm cache make clean --force and npm cache verify did not work for me. Tried to delete cache folder and file with ambassador permission, did not work. The process-explorer tool helped me finding that Node.exe is property on the cache file. I killed the process and tried to make clean, worked.

~ Answered on 2019-05-23 15:50:15


I encountered this problem while executing the "npm publish" command.

And then I checked the error log, and solved this past executing "npm config prepare registry http://registry.npmjs.org" control. The obvious reason for this problem is that I set upwardly some other registry.

So, if you are in the same situation as mine, endeavour setting the registry to official one.

~ Answered on 2019-06-21 02:41:06


WHAT WORKED FOR ME

I ran Command Prompt equally Ambassador. This helped partially - as I no longer got the error, "Delight effort using this command over again as root/administrator". I was trying to install Cordova. To practice it successfully, I also had to exercise the following:

(1) "npm update node", plus...

(2) I also added the " -thou " in the >>npm install cordova<<. In other words, type this: >>npm install -m cordova<<

~~~ FOR WINDOWS 8.1 ~~~

"RUN Equally ADMINISTRATOR" COMMAND PROMPT

For windows 8.1, I don't accept an ACCESSORIES group when I click START > ALL PROGRAMS. But I do take that older -- merely trusty and reliable -- Start Push and START MENU - thank you to the free Classic Start Card app. And so, with that installed....

Alternative #1:

              1. Type "cmd" in the SEARCH BOX at the bottom of the Starting time menu.   2. When cmd.exe shows up in the elevation of the search results, right click it and select RUN AS Administrator.                          

Alternative #ii If you already have a Command Prompt window open up and running - and you want to open another one to Run As Administrator:

              1. Locate the Command Prompt app icon in the Taskbar (usually along the bottom of you lot screen unless you have moved information technology a different dock/location). 2. Correct click the app icon. three. Now, right click "Command PROMPT" and select RUN AS ADMINISTRATOR.                          

Promise this helps someone.

~ Answered on 2017-07-24 19:53:08


If you're in react native projection, and Expo is running, then shut it.

Re-install the parcel, and everything should be fine.

~ Answered on 2018-05-26 eighteen:14:50


Like the other answers, clean npm cache and make sure the enshroud folder is empty, then run npm install several times. Each time the error bulletin comes for different packages, and the terminal time (later X attempts) it succeeds.

  1. Run npm clean cache --strength
  2. cd %APPDATA%\npm-cache (or cd $env:APPDATA\npm-enshroud for PowerShell)
  3. del * to delete everything in the folder
  4. Get back into the project binder and run npm install several times until information technology succeeds. Notice that the error messages come up for different packages every time.

~ Answered on 2017-06-17 14:47:39


I don't know which steps worked for me. But these are my steps to go rid of this error:

  1. Updated Node.js
  2. Ran npm cache clean command in Command prompt ( With some element of uncertainty for enshroud presence)
  3. Ran react-native init in control prompt as Ambassador (on Windows OS), hoping works well with sudo react-native init on Mac OS

~ Answered on 2016-07-xxx sixteen:08:53


barfieldsurns1966.blogspot.com

Source: https://syntaxfix.com/question/10020/npm-please-try-using-this-command-again-as-root-administrator

0 Response to "Babel Install Please Try Running This Command Again as Adminstrator as Root"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel