我已经在我的电脑上安装了nodejs和yarn (Linux Deepin)。我还全局安装了create-react-app。但是,create-react-app命令未运行。我一直收到错误: bash: create-react-app: command not found。
我是不是遗漏了什么配置?因为我已经看到了全局安装的create-react-app。
NodeJS - v6.3.1纱线- 1.6.0操作系统版本Linux Deepin -15
发布于 2018-05-21 17:59:35
将yarn全局路径添加到path变量下面将yarn全局路径附加到~/.bashrc
echo 'export PATH="$PATH:$(yarn global bin)"' >> ~/.bashrc 如果您使用的是其他shell,如zsh,请确保您附加到正确的文件以供zsh使用
echo 'export PATH="$PATH:$(yarn global bin)"' >> ~/.zshrc最后要确保重启终端。
发布于 2018-05-21 17:58:57
您确定命令已经在您的路径中了吗??如果你只是安装了它,也许,只要关闭并重新启动终端即可;)
https://stackoverflow.com/questions/50446254
复制相似问题