2018 December

npm 安装模块找不到对应的命令

运行 npm install -g @tarojs/cli  全局安装模块 fantingshengdeMacBook-Pro:study fantingsheng$ taro init myApp -bash: /usr/local/bin/taro: No such file or directory 找不到相关的命令,八成是环境变量问题,设置环境变量就可以了 # 用一个通用的命令配置环境变量 ~$ echo -e “export PATH=$(npm prefix -g)/bin:$PATH” >> ~/.bashrc && source ~/.bashrc  

Sidebar