【发布时间】:2023-03-23 22:57:01
【问题描述】:
我正在尝试安装react-native-version-number。 instructions 表示安装后发出;
react-native link react-native-version-number
但是当我这样做时,我收到以下错误消息;
Looks like you installed react-native globally, maybe you meant react-native-cli?
To fix the issue, run:
npm uninstall -g react-native
npm install -g react-native-cli
但是当我跑步时
npm uninstall -g react-native
我明白了
npm WARN uninstall not installed in /usr/local/lib/node_modules: "react-native"
如何链接 react-native-version-number?
【问题讨论】:
-
rnpm 链接? (如果你安装了 rnpm)
-
您是否从项目根目录运行 react-native 链接?
-
我刚查了一下,肯定是从根目录下运行的。
-
dv3:rnpm 链接确实有效。如果你按照这些思路写一个答案,那么我会接受它。如果您解释为什么 react-native 链接不起作用,那将是一个更好的答案。
标签: npm react-native