我正在创建-bash:react-native:在创建react-native项目时找不到命令错误.
以下是其他信息
1. brew --version
homebrew 0.9.9
2 brew info watchman
watchman `enter code here`stable 4.50
/usr/local/Cellar/watchman/4.4.0
3. brew info flow
stable 0.24.1
/usr/local/Cellar/flow/0.24.1
4. brew info node
stable 6.1.0
/usr/local/Cellar/node/6.1.0
5. npm -version
3.8.6
6. echo $PATH
/Users/Ashok/.rbenv/shims:/Users/Ashok/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
Run Code Online (Sandbox Code Playgroud)
我尝试了从下面的链接建议的步骤,但我仍然得到相同的错误.
我没有他们在解决方案中指定的任何"npm"目录
Ashoks-MacBook-Pro:share Ashok$ ls
aclocal doc info ruby-build zsh
autoconf emacs man systemtap
Run Code Online (Sandbox Code Playgroud)
但我发现npm文件存在于以下位置.
/usr/local/Cellar/node/6.1.0/etc/bash_completion.d
Run Code Online (Sandbox Code Playgroud)
我卸载了react-native并再次安装,但我仍面临同样的问题.
我开始安装反应原生.我已经成功安装了homebrew,nodejs,npm.但无法安装反应原生
首先我试过了
npm install -g react-native-cli
给我写警告:
Missing write access to /Users/project/.npm-packages/lib/node_modules/react-native-cli
之后我尝试过
sudo npm install -g react-native-cli
/Users/project/.npm-packages/bin/react-native -> /Users/project/.npm-packages/lib/node_modules/react-native-cli/index.js /Users/project/.npm-packages/lib ??? react-native-cli@1.0.0
看起来像安装.
之后我尝试了
react-native init AwesomeProject
Error : react-native: command not found
可能是什么问题呢
我刚刚按照本指南在 MacBook 上安装了 appcenter CLI: https: //learn.microsoft.com/en-us/appcenter/cli/
当尝试从终端运行命令时,例如appcenter login我收到以下错误:
-bash: appcenter: command not found
我退出了所有终端进程并重新启动了一个,但也没有运气。我需要导出某种路径才能使其工作吗?