2017-09-07 15 views
0

私はちょうどバージョンv6.11.3 とNPMのバージョンに私のノードをアップグレードするには、私がnpm install error "root/Administratorとしてこのコマンドを再度実行してください。"

npm install 

または任意のNPMな

npm install nodemon 

としてインストールを実行しようとしてい5.4.1

ですこの問題があります。

npm WARN deprecated [email protected]: Please update to the latest version of pug, at time of writing that is [email protected] 
npm WARN deprecated [email protected]: Please use pug-load for [email protected]<=1.0.2. 
npm ERR! path C:\Users\project\node_modules\fsevents\node_modules\aws-sign2\package.json 
npm ERR! code EPERM 
npm ERR! errno -4048 
npm ERR! syscall unlink 
npm ERR! Error: EPERM: operation not permitted, unlink 'C:\Users\project\node_modules\fsevents\node_modules\aws-sign2\package.json' 
npm ERR!  at Error (native) 
npm ERR! { Error: EPERM: operation not permitted, unlink 'C:\Users\project\node_modules\fsevents\node_modules\aws-sign2\package.json' 
npm ERR!  at Error (native) 
npm ERR! stack: 'Error: EPERM: operation not permitted, unlink \'C:\\Users\\project\\node_modules\\fsevents\\node_modules\\aws-sign2\\package.json\'\n at Error (native)', 

npm ERR! errno: -4048, 
npm ERR! code: 'EPERM', 
npm ERR! syscall: 'unlink', 
npm ERR! path: 'C:\\Users\\project\\node_modules\\fsevents\\node_modules\\aws-sign2\\package.json' } 
npm ERR! 
npm ERR! Please try running this command again as root/Administrator. 

npm ERR! A complete log of this run can be found in: 
npm ERR!  C:\Program\_logs\2017-09-07T21_55_47_482Z-debug.log 

私はグーグルと、このような

npm cache clean 

など、さまざまな方法の多くをしようとしたが、この問題

npm ERR! As of [email protected], 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. 
npm ERR! 
npm ERR! If you're sure you want to delete the entire cache, rerun this command with --force. 

npm ERR! A complete log of this run can be found in: 
npm ERR!  C:\Program\_logs\2017-09-07T22_03_49_893Z-debug.log 

を持ってきた私は、この問題と可能な問題を解決する方法を確認していませんnodemon bin/www

+0

は、管理者としてcmdを開き、UNIXシステム上の場合は、コマンド – JohnnyAW

+0

を実行しよう: 'sudoのNPM私はあなたが説明するものでしたが、それでも同じ問題を抱えて' – fdelia

答えて

0

の代わりに自分のノードを実行するために、元のノードのインストールをn管理者。これで、管理者はグローバルnode_modulesディレクトリを所有します。右sudoを使用し、OSXやLinuxでは、特定のコマンドウィンドウ内のnpm install

を実行してみてくださいオープン管理者として

  • を選択してくださいcmdpowershellアプリケーション
  • をクリックしてWindowsの

    • sudo npm install 
      
  • +0

    をインストールします。私はfseventsのためにその場合 – Tenz

    1

    今日はまったく同じ問題がありました。

    info [email protected]: The platform "win32" is incompatible with this module. 
    info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation. 
    

    ので、糸がそれを処理することができましたし、それは私のために働いていた:私は、これは、次の私に言った

    npm install -g yarn 
    

    をインストールした後、
    yarn install 
    

    を走りました。

    +0

    私は問題がnpmのバージョンだと思うのだろうか。私は以前のnpmバージョンの5.2.0に敬意を表して考え出しました。もう一度動作します。 – Tenz

    5

    - no-optionalパッケージをインストール中にお試しください。それは私のために働いた。
    npm install nodemon --no-optional

    関連する問題