React native 为什么react Native无法运行ubuntu 20.04

React native 为什么react Native无法运行ubuntu 20.04,react-native,ubuntu,React Native,Ubuntu,当我尝试使用npm安装时,我得到了下面的控制台用语 guilherme@guilherme-Aspire-A515-52G:~$ npm install -g react-native-cli npm WARN checkPermissions Missing write access to /usr/local/lib npm ERR! code EACCES npm ERR! syscall access npm ERR! path /usr/local/lib npm ERR! er

当我尝试使用
npm
安装时,我得到了下面的控制台用语

 guilherme@guilherme-Aspire-A515-52G:~$  npm install -g react-native-cli  npm WARN checkPermissions Missing write access to /usr/local/lib npm ERR! code EACCES npm ERR! syscall access npm ERR! path /usr/local/lib npm ERR! errno -13 npm ERR! Error: EACCES: permission denied, access '/usr/local/lib' npm ERR!  { [Error: EACCES: permission denied, access '/usr/local/lib'] npm ERR!   stack: npm ERR! 'Error: EACCES: permission denied, access \'/usr/local/lib\'', npm ERR!   errno: -13, npm ERR!   code: 'EACCES', npm ERR!   syscall: 'access', npm ERR!   path: '/usr/local/lib' } 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!     /home/guilherme/.npm/_logs/2020-06-17T23_39_26_149Z-debug.log guilherme@guilherme-Aspire-A515-52G:~$ ^C guilherme@guilherme-Aspire-A515-52G:~$
因此,我尝试使用
纱线
,效果很好,但不是100%
因为,这次我写作的时候,

react-native init myProject 
我得到一个错误,比如:

未找到return命令


在此方面的任何帮助都将不胜感激

马诺,欧盟-美国-意大利博览会,e atéagora ta me servindo bem,da uma olhada na documentação,ébem simples

Instala a o expo cli:

npm install expo-cli --global
中区填海工程:

expo init nomeDoSeuApp
意大利面食:

cd nomeDoSeuApp
E da um start na servidor:

expo start 
使用android Simulator进行评估时,应使用qr代码,无终端数据
a
que ele ja inicia o应用程序无seu Simulator


我正在使用expo cli,它为我提供了很好的服务,请查看文档

首先,在全球范围内安装:

npm install expo-cli --global
创建项目:

expo init nameOfYourApp
进入文件夹:

cd nameOfYourApp
启动服务器:

expo start 
如果您使用的是android模拟器,在终端显示qr码后键入
a
,应用程序将在模拟器上自动启动