ESlint is not a constructor
wanglimindeMacBook-Air:front-start wanglimin$ yarn serve yarn run v1.22.17 $ vue-cli-service serve INFO Starting development server... ERROR Failed to compile with 2 errors 上午7:47:15 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 is not a constructor - child-compiler.js:169 [front-start]/[html-webpack-plugin]/lib/child-compiler.js:169:18 - Compiler.js:564 [front-start]/[webpack]/lib/Compiler.js:564:11 - Compiler.js:1183 [front-start]/[webpack]/lib/Compiler.js:1183:17 - task_queues.js:93 processTicksAndRejections internal/process/task_queues.js:93:5 - task_queues.js:62 runNextTicks internal/process/task_queues.js:62:3 - timers.js:434 processImmediate internal/timers.js:434:9 ERROR in ESLint is not a constructor ERROR in Error: Child compilation failed: ESLint is not a constructor - child-compiler.js:169 [front-start]/[html-webpack-plugin]/lib/child-compiler.js:169:18 - Compiler.js:564 [front-start]/[webpack]/lib/Compiler.js:564:11 - Compiler.js:1183 [front-start]/[webpack]/lib/Compiler.js:1183:17 - task_queues.js:93 processTicksAndRejections internal/process/task_queues.js:93:5 - task_queues.js:62 runNextTicks internal/process/task_queues.js:62:3 - timers.js:434 processImmediate internal/timers.js:434:9 1 ERROR in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details) webpack compiled with 3 errors
8:19 秒的地方未能正常跑通
Eslint is not a constructor 什么的,算什么问题?
按照他提示做了也没有得到更多的信息
本地代码我提交到github仓库了
https://github.com/lukegao1986/front-start
(终于可以会用git和老师说明问题了,想想还有点小激动😄)
39
收起
正在回答
1回答
你的项目没有入口文件:
我添加了main.js,没有添加router啊,只是示意:
import Vue from 'vue' import App from './App.vue' new Vue({ el: '#app', render: (h) => h(App) }).$mount()
没有你说的报错了~
修改了eslint
module.exports = { root: true, env: { node: true }, extends: [ 'plugin:vue/essential', '@vue/standard' ], rules: { 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', 'vue/multi-word-component-names': 'off' }, parserOptions: { parser: '@babel/eslint-parser' } }
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星