Npm Install Windows Error Please Try Running This Command Again as Rootadministrator

Npm Please endeavor using this control once again equally root/administrator

Solution one

It turns out that you don't accept to run the command again as Administrator, and doing so won't gear up the problem.

Try:

  1. npm cache make clean first.

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

Later on cleaning the cache, you may still be left with remnants. Manually remove everything in that directory, and try again. This has e'er stock-still things for me.

As @Crazzymatt was mentioning, as of the [email protected] version and up, we demand to use npm enshroud verify instead of npm cache make clean. Or else y'all volition get an fault as preceding.

npm ERR! Equally of [email protected], the npm cache self-heals from corruption issues and information extracted from the cache is guaranteed to be valid. If you desire to make certain everything is consequent, utilise 'npm cache verify' instead.

(Source: MSDN Blog post)

Solution 2

I solve information technology running every bit ambassador cmd. Cleaning the cache npm cache clean -f And then try to install the parcel again

Solution 3

You lot should run cmd.exe every bit administrator.

Follow the following steps:

  • Click Showtime, click All Programs, and so click Accessories.
  • Right-click Command prompt, and and then click Run every bit administrator.

Solution 4

Here is how I fixed this on my Windows (7) Dev. environment. I presume the post-obit...

  • Y'all are Running Command Prompt, Git Bash, Cmder or your favorite Terminal, equally an Administrator by right clicking
  • Privileges Permissions have been granted for Read/Write (i.due east chmod -777)

Okay, let'southward go to information technology:

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

    npm update -g npm

    npm update -1000 graceful-fs

  2. Side by side we want to force a cache clean. This is flagged by an '--f' or '-f'..

    npm cache clean --f

  3. In Widows Explorer search for the following path

%APPDATA%\npm-enshroud

And Delete it's contents

  1. Commencement a fresh instance of your Terminal, remembering to 'Right-Click' and 'Run as Administrator ', install the packages once again.

Hope this helps someone!!

Solution 5

I was already running the Node Command Window every bit Administrator. As mentioned by many to a higher place, the post-obit command with --f (force) solved my effect.

npm cache clean -f

Subsequently the Cache Clean, the install was flawless. Come across the screenshot for reference

Related videos on Youtube

Comments

  • I've been badly trying to install modules using node.js but it always fails getting packages with npm.

    I logged in every bit Administrator and used powershell/cmd with "run as administrator". I also had problems with the registry so I used npm set registry http://registry.npmjs.org/

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

    Hither are the errors:

    npm ERR! Please try running this command once more as root/Ambassador.

                        npm ERR! Arrangement Windows_NT 6.2.9200 npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program 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 ane.four.3 npm ERR! path D:\Sergiu\Knockout Test\node_modules\generator-knockout\node_modules\yeoman-generator\node_modules\tar\node_modules\cake-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\cake-stream\block-stream.js npm ERR! fstream_type File npm ERR! fstream_class FileWriter npm ERR! code EPERM npm ERR! errno 50 npm ERR! stack Error: EPERM, lstat 'D:\Sergiu\Knockout Test\node_modules\generator-knockout\node_modules\yeoman-generator\node_modules\tar\node_modules\block-stream\block-stream.js' npm ERR! fstream_stack C:\Program Files\nodejs\node_modules\npm\node_modules\fstream\lib\author.js:284:26 npm ERR! fstream_stack Object.oncomplete (fs.js:107:15) npm ERR! Error: EPERM, lstat 'D:\Sergiu\Knockout Exam\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: 50, 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 attempt running this command again as root/Administrator.                                      
    • My node_modules folder was set to readonly! Right-click backdrop and fix it. :}

    • I had a similar fault to this, but on Mac, and fixing information technology involved switching access on both node_modules and my usr/local/bin binder from "Read only" to "Read & Write"

  • this worked for me on windows 10 - run as admin didn't solve the problem

  • I tried your advice, just when I got to step 3 -->> running reactive-native init in command prompt <<-- apparently I don't have that programme installed -. Adjacent - I searched my arrangement using start menu Search - nothing comes upward. Side by side, I googled it, and GOOGLE suggests "react..." (not "reactive..."). Can someone peradventure explicate how to install or use REACTIVE-NATIVE - or- REACT-NATIVE ??? Thank you in advance

  • Thank you @tigerRose. Great instructions. Seemed to assist me make progress.

  • Lamentable, it'southward a typo. It's react-native, not reactive-native

  • Finally, "Plow off firewall and antivirus protections" back on

  • Every bit of NPM5 yous can run "npm cache verify" which worked for me

  • Sometimes npm cache clean will give y'all a warning so you may desire to force it to clean by doing npm enshroud clean --force

  • Just running the command (eg npm install --salvage xxx) again worked for me.

  • endeavor : npm cache verify

  • That should really exist a comment. It gives boosted helpful info, only doesnt solve the question.

  • @GhostCat Information technology is a possible solution, and so it should be an answer!

  • For my case I had to reboot my car subsequently clearing the %APPDATA%\npm-cache binder. Windows 10.

  • Deleting contents of npm-enshroud worked for me. Thanks

Recents

Related

fieldswatich.blogspot.com

Source: https://9to5answer.com/npm-please-try-using-this-command-again-as-root-administrator

0 Response to "Npm Install Windows Error Please Try Running This Command Again as Rootadministrator"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel