[英]Error executing the react-native-init command
I'm trying to create a React Native project on MacOs through Terminal.我正在尝试通过终端在 MacOs 上创建一个 React Native 项目。 I type the following commands in Terminal:
我在终端中输入以下命令:
> cd Desktop
> mkdir curso-react
> cd curso-react/
> react-native init exercicios
After running the react-native init
command the following permission error is displayed for me:运行
react-native init
命令后,为我显示以下权限错误:
How can I solve this issue?我该如何解决这个问题?
似乎.npm
文件夹的权限不正确运行此命令来解决此问题:
sudo chown -R $(whoami) ~/.npm
在react-native
命令之前用sudo
命令更正了文件夹中的权限错误,如下所示:
> sudo react-native init exercicios
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.