preface

Angular, which has been using it for a long time, plans to do something with Vue3.0 and React hooks just in time for the end of the year. But after YARN Global Add. The 120 gigabyte drive C of the company computer was not available. It’s not just that, of course, but node_module is horrible. Toss about for a long time, finally fixed a safe way to use.

The environment

Win10 2004; node 12+(14+); Address: E: / tools

Steps:

  1. Download the Node. msi installation package from E:/tools/node
  2. Change the NPM prefix and cache installation directory
  3. NPM install -g yarn (I spent about 4 hours a day trying to install yarn.msi without success. Modify yarn global and cache
  4. Adding environment variables
  5. The vue or react command cannot be found after yarn global add @vue/cli or reate-react-app. The vue React path has not been added. You can find E: tools/yarn/global/node_modules.bin to add the path (if not, go to npm_global and find bin below yarn to add the path as well).
  6. Configuration file path
  7. I’m a halfway man, and I’m not quite sure why it worked. I see, command can not find is the path problem. Follow this path Baidu, Google. You can install @vue/cli and try vue –version. It would be great if it worked. You don’t have to kill drive C and reinstall the system like I did.

Refer to the link

  1. ‘blog.csdn.net/sinat_36728… ‘