Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Macos 关于';未找到zsh react native命令';设置路径后_Macos_React Native_Zsh - Fatal编程技术网

Macos 关于';未找到zsh react native命令';设置路径后

Macos 关于';未找到zsh react native命令';设置路径后,macos,react-native,zsh,Macos,React Native,Zsh,不久前,我在运行expo时遇到了命令notfound error,因此我将path设置为~/.bash\u profile,因此,在运行source~/.bash\u profile之后,现在我可以毫无问题地调用expo了 今天,我尝试运行react native link,出现以下错误: zsh:react-native命令未找到 我还能做错什么呢?也许您没有在全球范围内安装,这很好,因为它不需要 如果安装了react native,请检查项目目录 因此,/node\u modules/rea

不久前,我在运行expo时遇到了命令notfound error,因此我将path设置为
~/.bash\u profile
,因此,在运行source~/.bash\u profile之后,现在我可以毫无问题地调用expo了

今天,我尝试运行react native link,出现以下错误:
zsh:react-native命令未找到

我还能做错什么呢?

也许您没有在全球范围内安装,这很好,因为它不需要

如果安装了react native,请检查项目目录 因此,
/node\u modules/react native/
应该存在,并且里面有一些东西

如果是这样,您不需要直接运行
react native
;尝试运行
npx react native
或npm脚本


如果没有,请确保您在
package.json
dependencies部分中有react-native,并运行
npm install
以提取react-native库文件夹。

非常感谢!使用npx react本机链接工作!!