【发布时间】:2016-01-21 19:43:07
【问题描述】:
我已经成功安装了brew、node 4.0+、watchman和flow,我在做npm install -g react-native-cli的时候收到如下:
/Users/home/.node/bin/react-native -> /Users/home/.node/lib/node_modules/react-native-cli/index.js
react-native-cli@0.1.5 /Users/home/.node/lib/node_modules/react-native-cli
└── prompt@0.2.14 (revalidator@0.1.8, pkginfo@0.3.1, read@1.0.7, winston@0.8.3, utile@0.2.1)
所以我假设react-native-cli 也已成功安装。但是,当我运行react-native 时,它会说:
-bash: react-native: command not found
我的节点版本是 4.2.1,watchman 3.9,brew 0.9.5 (git 7ed6) 和 npm 2.14.7
【问题讨论】:
-
react-native:找不到命令。 stackoverflow.com/questions/37189081/…
-
其他使用
nvm的人可能想检查他们的nvm版本是否持续。当我的PATH中有旧的npmbin 路由需要删除时,我遇到了这个问题 -
这对我有用,也许这可能是类似问题的解决方案。 github.com/facebook/react-native/issues/…
标签: node.js bash installation homebrew react-native