无法为React Native安装Expo-Cli“ checkPermissions缺少写访问权限”

时间:2019-12-10 01:06:04

标签: reactjs install expo

我正在尝试尝试ReactNative,但在学习本教程时却无法安装expo cli。

我已经成功安装了自制软件,watchman和node.js。

我该如何解决?提前非常感谢!

我在下面包含了错误消息:

rachykc@Rachels-Air ReactNative % npm install -g react-native-cli
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/react-native-cli
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules/react-native-cli
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules/react-native-cli'
npm ERR!  [Error: EACCES: permission denied, access '/usr/local/lib/node_modules/react-native-cli'] {
npm ERR!   stack: "Error: EACCES: permission denied, access '/usr/local/lib/node_modules/react-native-cli'",
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib/node_modules/react-native-cli'
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/rachykc/.npm/_logs/2019-12-10T00_44_12_658Z-debug.log
rachykc@Rachels-Air ReactNative % 

0 个答案:

没有答案