title: unable to install vue on macos using npm
body: <p>there are a few steps:</p>
  <ol>
  <li><p>Use node v10+ instead of v14+.</p>
  </li>
  <li><p>(IMPT) add the following path to <code>~/.zshrc</code> (if you are using zsh)</p>
  </li>
  </ol>
  <p><code>/Users/[yourUsername]/.npm-packages/bin</code></p>
  <p><code>/Users/[yourUsername]/.npm-global/bin</code></p>
  <ol start="3">
  <li>run <code>source ~/.zshrc</code> after modifying the file.</li>
  </ol>
  <p>Much thanks to @<a href="https://stackoverflow.com/users/8816585/kissu">kissu</a> and @<a href="https://stackoverflow.com/users/14618789/lakindu-hewawasam">Lakindu Hewawasam</a> !!</p>
  <p>-------original question-------</p>
  <p>I'm on MacOS 10.15.5, node version v14.15.4, npm version 6.14.10.</p>
  <p>I've been getting the error <code>zsh: command not found: vue</code>, after trying multiple ways to download Vue.</p>
  <p>I first tried <code>npm install -g @vue/cli</code>, and it was giving me this error, so I uninstalled and tried again with <code>sudo npm install -g @vue/cli @vue/cli-init --unsafe-perm</code> referring to <a href="https://stackoverflow.com/questions/57441093/npm-install-g-vue-cli-vue-cli-init-errors">this</a>. Still, it doesn't work:</p>
  <pre><code>yingjieqiao@Yingjies-MacBook-Pro ~ % sudo npm install -g @vue/cli @vue/cli-init --unsafe-perm
  npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
  npm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi'
  npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
  npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
  npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
  npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
  npm WARN deprecated har-validator@5.1.5: this library is no longer supported
  npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
  npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
  npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
  npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
  npm WARN deprecated vue-cli@2.9.6: This package has been deprecated in favour of @vue/cli
  npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to &quot;coffeescript&quot; (no hyphen)
  
  &gt; yarn@1.22.10 preinstall /Users/yingjieqiao/.npm-global/lib/node_modules/@vue/cli/node_modules/yarn
  &gt; :; (node ./preinstall.js &gt; /dev/null 2&gt;&amp;1 || true)
  
  /Users/yingjieqiao/.npm-global/bin/vue -&gt; /Users/yingjieqiao/.npm-global/lib/node_modules/@vue/cli/bin/vue.js
  
  &gt; fsevents@1.2.13 install /Users/yingjieqiao/.npm-global/lib/node_modules/@vue/cli/node_modules/fsevents
  &gt; node install.js
  
    SOLINK_MODULE(target) Release/.node
    CXX(target) Release/obj.target/fse/fsevents.o
    SOLINK_MODULE(target) Release/fse.node
  
  &gt; core-js@3.8.2 postinstall /Users/yingjieqiao/.npm-global/lib/node_modules/@vue/cli/node_modules/core-js
  &gt; node -e &quot;try{require('./postinstall')}catch(e){}&quot;
  
  Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
  
  The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
  &gt; https://opencollective.com/core-js
  &gt; https://www.patreon.com/zloirock
  
  Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
  
  
  &gt; @apollo/protobufjs@1.0.5 postinstall /Users/yingjieqiao/.npm-global/lib/node_modules/@vue/cli/node_modules/@apollo/protobufjs
  &gt; node scripts/postinstall
  
  
  &gt; nodemon@1.19.4 postinstall /Users/yingjieqiao/.npm-global/lib/node_modules/@vue/cli/node_modules/nodemon
  &gt; node bin/postinstall || exit 0
  
  
  &gt; ejs@2.7.4 postinstall /Users/yingjieqiao/.npm-global/lib/node_modules/@vue/cli/node_modules/ejs
  &gt; node ./postinstall.js
  
  Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)
  
  npm WARN @vue/compiler-sfc@3.0.5 requires a peer of vue@3.0.5 but none is installed. You must install peer dependencies yourself.
  
  + @vue/cli@4.5.9
  + @vue/cli-init@4.5.9
  added 1367 packages from 714 contributors and updated 1 package in 43.692s
  yingjieqiao@Yingjies-MacBook-Pro ~ % vue --version
  zsh: command not found: vue
  yingjieqiao@Yingjies-MacBook-Pro ~ % npm update -g @vue/cli
  
  yingjieqiao@Yingjies-MacBook-Pro ~ % vue --version
  zsh: command not found: vue
  yingjieqiao@Yingjies-MacBook-Pro ~ %
  </code></pre>
  <p>In the warning message, it mentioned &quot;xxx package will break on node v14+&quot; a few times. But I think the download command in the official docs should work regardless?</p>