Scenario where the error occurs:
It’s also a question from other friends, I also tried it, and it’s true
ERROR Failed to compile with 1 error This dependency was not found: * vue in ./src/main.js To install it, you can run: npm install --save vue
Causes and solutions:
1, because in main.js, a space is added to the import vue statement, resulting in an error;
Error example: import Vue from ” vue”; // Note the space here, that’s what’s causing the problem;
Correct example:import Vue from “vue”
2. I hope that friends can locate the problem faster;