> shop@0.1.0 serve > vue-cli-service serve INFO Starting development server... ERROR Failed to compile with 2 errors 10:52:05 [eslint] ESLint is not a constructor You may use special comments to disable some warnings. Use // eslint-disable-next-line to ignore the next line. Use /* eslint-disable */ to ignore all warnings in a file. Error: Child compilation failed: [eslint] ESLint is not a constructor - child-compiler.js:169 [shop]/[html-webpack-plugin]/lib/child-compiler.js:169:18 - Compiler.js:551 finalCallback [shop]/[webpack]/lib/Compiler.js:551:5 - Compiler.js:577 [shop]/[webpack]/lib/Compiler.js:577:11 - Compiler.js:1199 [shop]/[webpack]/lib/Compiler.js:1199:17 - task_queues:95 process.processTicksAndRejections node:internal/process/task_queues:95:5 ERROR in [eslint] ESLint is not a constructor ERROR in Error: Child compilation failed: [eslint] ESLint is not a constructor - child-compiler.js:169 [shop]/[html-webpack-plugin]/lib/child-compiler.js:169:18 - Compiler.js:551 finalCallback [shop]/[webpack]/lib/Compiler.js:551:5 - Compiler.js:577 [shop]/[webpack]/lib/Compiler.js:577:11 - Compiler.js:1199 [shop]/[webpack]/lib/Compiler.js:1199:17 - task_queues:95 process.processTicksAndRejections node:internal/process/task_queues:95:5 1 ERROR in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details) webpack compiled with 3 errors
时间: 2024-02-14 18:08:26 浏览: 277
vue-cli4-vant:基于vue-cli4和vant的移动端开发模板
这个错误是由于 ESLint 未能正确加载导致的。你可以尝试执行以下步骤来解决此问题:
1. 确保你已经安装了 ESLint:`npm install eslint --save-dev`
2. 检查你的 ESLint 配置文件是否正确配置。
3. 尝试清除你的缓存并重新构建项目:`npm cache clean --force`,然后再次运行 `npm run serve`。
如果这些步骤都无法解决问题,你可能需要进一步检查你的项目配置和依赖项。
阅读全文