npmに関するインストールの問題


問題と解決策:


一、問題:
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
    

    参照先:
  • Browserslist: caniuse-lite is outdated
  • caniuse-lite is outdated.
  • npm WARN … requires a peer of … but none is installed. You must install peer dependencies yourself