npm安装权限被拒绝/.npm/_cacache/

时间:2019-05-07 06:27:31

标签: node.js reactjs react-native npm npm-install

当我使用sudo npm install命令时出现错误。

usr6783@usr6783:~/albarakaMobil/client/mobile-branch$ sudo npm install
[sudo] password for usr6783: 
npm WARN deprecated react-native-languages@1.0.7: This project has been renamed to react-native-localize. Install using react-native-localize  instead.
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated sw-precache@5.2.1: Please migrate to Workbox: https://developers.google.com/web/tools/workbox/guides/migrations/migrate-from-sw
npm WARN deprecated browserslist@2.11.3: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.
npm WARN deprecated sw-toolbox@3.6.0: Please migrate to Workbox: https://developers.google.com/web/tools/workbox/guides/migrations/migrate-from-sw
npm WARN deprecated core-js@1.2.7: core-js@<2.6.5 is no longer maintained. Please, upgrade to core-js@3 or at least to actual version of core-js@2.
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated node-uuid@1.3.3: Use uuid module instead
npm WARN deprecated flatten@1.0.2: I wrote this module a very long time ago; you should use something else.
npm WARN deprecated socks@1.1.10: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm ERR! code 1
npm ERR! Command failed: git clone --mirror -q git://github.com/rhdeck/react-native-fix-xcode-10.git /home/usr6783/.npm/_cacache/tmp/git-clone-aa7d6ae5/.git
npm ERR! /home/usr6783/.npm/_cacache/tmp/git-clone-aa7d6ae5/.git: Permission denied
npm ERR! 

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/usr6783/.npm/_logs/2019-05-07T06_12_46_865Z-debug.log

1 个答案:

答案 0 :(得分:0)

使用:

  

sudo npm缓存清理-f

指的是this