问题及解决方案:
一、
问题:
Installation Problem: bash: yarn: command not found
解决方案:
npm install -g yarn
参考:
- Installation Problem: bash: yarn: command not found #601
- Yarn does not work in Git Bash on Windows #5349
- Git Bash Command on Windows, yarn command not found
二、
问题:
Building for production...Browserslist: caniuse-lite is outdated. Please run next command `npm update caniuse-lite browserslist`
解决方案:
暂无。
三、
问题:
npm WARN … requires a peer of … but none is installed.
You must install peer dependencies yourself.
解决方案:
一、Deprecated Solution:
1. You can use npm-install-peers to find and install required peer dependencies.
$ npm install -g npm-install-peers
$ npm-install-peers
2. If you are getting this error after updating any package's version then remove node_modules directory and reinstall packages by npm install or npm cache clean and npm install.
二、Updated Solution:
Use following for each peer dependency to install that and remove the error
$ npm install --save-dev xxxxx
参考: