明明安装了yarn/cnpm,运行却报-bash: yarn/cnpm: command not found
各种百度谷歌后发现原来安装yarn或cnpm后把路径添加到 $PATH中,
命令:export PATH=/usr/local/lib/nodejs/node-v12.16.3-linux-armv7l/lib/node_modules/cnpm/bin/:$PATH
还有再安装的时候如果报错:If you believe this might be a permissions issue, please double-check the permissions of the file and its containing directories, or try running the command again as root/Administrator.说明需要用root 权限去安装,命令:sudo npm install -g yarn 之后输入密码就可以安装