- Check node version
$ node -v
- As for Taro 3.x, requires node v12, so install node v12 if not
$ nvm use v12
- Install Taro CLI under
.nvm/version/node/<version>
globally
Usenpm -g
instead ofyarn global
,yarn global
will not install global packages under.nvm
$ npm install -g @tarojs/cli
- Check Taro info
$ which Taro # ~/.nvm/versions/node/v12.16.1/bin/taro
$ taro info