Article directory
1. BUG description
After using the yarn command to create a new vue+Vite project, an error occurred when entering the yarn command to run.
2. Cause analysis
D:\nodejs\node_global\node_modules
The npm folder is missing in the folder prompted by Error
3. Solution
1. Move npm files
Find the downloaded node.js
folder, enter node_modules
the folder, copy npm
the folder and paste it to the path D:\nodejs\node_global\node_modules
where the error was reported just now
2. Install vue.js with npm
npm install vue -g
3. Install vue-router with npm
npm install vue-router -g
4. Install vue scaffolding with npm
npm install vue-cli -g
5. Install yarn with npm
npm install -g yarn
6. Run yarn command
4. Command summary (just copy and paste)
npm install vue -g
npm install vue-router -g
npm install vue-cli -g
npm install -g yarn
yarn