gpt4 book ai didi

react-native - 找不到安装的 react-native-cli 命令时出错

转载 作者:行者123 更新时间:2023-12-04 03:56:20 34 4
gpt4 key购买 nike

提前感谢您的帮助,我是 Mac 的新手,所以请原谅我的问题,如果它非常简单,我安装了 native-react-cli 并想打开/创建一个项目。但是我收到错误消息“react-native:找不到命令”

我安装了 react-native-cli:

npm install -g react-native-cli
npm http GET https://registry.npmjs.org/react-native-cli
npm http 304 https://registry.npmjs.org/react-native-cli
npm WARN package.json react-native-cli@0.1.3 No README.md file found!
/usr/local/share/npm/bin/react-native -> /usr/local/share/npm/lib/node_modules/react-native-cli/index.js
react-native-cli@0.1.3 /usr/local/share/npm/lib/node_modules/react-native-cli

我尝试打开/创建一个项目:

react-native AwesomeProject
-bash: react-native: command not found
react-native init helloWorld
-bash: react-native: command not found

感谢您的宝贵时间,非常感谢您的帮助

最佳答案

我遇到了这个问题,这仅仅是因为我的 brew 不是最新的。

我更新了 brew 并重新安装了 https://facebook.github.io/react-native/docs/getting-started.html#content 中列出的组件它又高兴了。

关于react-native - 找不到安装的 react-native-cli 命令时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29767729/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com