手记

笔记

test报错 Test suite failed to run / Cannot find module ‘request’

Something is up with your installed tree, doing npm dedupe && npm prune && npm install makes the test green.

安装yarn

sudo npm i -g yarn
通过上图,可以找到yarn的路径为/usr/local/bin/yarn,我们将其添加到~/.bash_profile中即可,
open ~/.bash_profile
具体添加以下:
export PATH="$PATH:`/usr/local/bin/yarn`"
保存后,让这个环境变量生效
source ~/.bash_profile
然后再执行yarn -version,已然ok

0人推荐
随时随地看视频
慕课网APP