【问题标题】:Upgrade expo cli to latest version. i got this error将 expo cli 升级到最新版本。我收到了这个错误
【发布时间】:2021-06-27 14:31:23
【问题描述】:

我尝试将 expo cli 升级到最新版本。我收到了这个错误。

DALAs-MacBook-Pro:~ SEAR$ npm i -g expo-cli
npm ERR! code EACCES
npm ERR! syscall rename
npm ERR! path /usr/local/lib/node_modules/expo-cli
npm ERR! dest /usr/local/lib/node_modules/.expo-cli-dKBr48UN
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/expo-cli' -> '/usr/local/lib/node_modules/.expo-cli-dKBr48UN'
npm ERR!  [Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/expo-cli' -> '/usr/local/lib/node_modules/.expo-cli-dKBr48UN'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'rename',
npm ERR!   path: '/usr/local/lib/node_modules/expo-cli',
npm ERR!   dest: '/usr/local/lib/node_modules/.expo-cli-dKBr48UN'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/sear/.npm/_logs/2021-06-26T14_35_24_132Z-debug.log

节点:v13.14.0 NPM:7.7.5 当前世博会:3.18.0

请帮忙,在此先感谢。

【问题讨论】:

    标签: node.js npm node-modules expo


    【解决方案1】:

    已通过运行 sudo npm i -g expo-cli 修复。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-08-26
      • 2017-10-11
      • 2012-04-21
      • 2022-01-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多