报错信息:
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:
Package subpath ‘./conf/environments’ is not defined by “exports” in F:\codeli b\rp05-doctor-web\node_modules@eslint\eslintrc\package.json
-
child-compiler.js:169
[rp05-doctor-web]/[html-webpack-plugin]/lib/child-compiler.js:169:18 -
Compiler.js:551 finalCallback
[rp05-doctor-web]/[webpack]/lib/Compiler.js:551:5 -
Compiler.js:577
[rp05-doctor-web]/[webpack]/lib/Compiler.js:577:11 -
Compiler.js:1196
[rp05-doctor-web]/[webpack]/lib/Compiler.js:1196:17 -
runMicrotasks
-
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 Package subpath ‘./conf/environments’ is not defined by “exports” in F:\codelib\rp05-doctor-web\node_modules@eslint\eslintrc\package.json
ERROR in Error: Child compilation failed:
Package subpath ‘./conf/environments’ is not defined by “exports” in F:\codeli b\rp05-doctor-web\node_modules@eslint\eslintrc\package.json
-
child-compiler.js:169
[rp05-doctor-web]/[html-webpack-plugin]/lib/child-compiler.js:169:18 -
Compiler.js:551 finalCallback
[rp05-doctor-web]/[webpack]/lib/Compiler.js:551:5 -
Compiler.js:577
[rp05-doctor-web]/[webpack]/lib/Compiler.js:577:11 -
Compiler.js:1196
[rp05-doctor-web]/[webpack]/lib/Compiler.js:1196:17 -
runMicrotasks
-
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)
本机环境:
node 14.16.0 npm 8.12.2
eslint版本:
"eslint": "^8.18.0",
"eslint-plugin-vue": "^9.1.1",
后面多次测试,发现报错是因为eslint版本过高,降版本为
"eslint": "^7.32.0",
"eslint-plugin-vue": "^8.0.3",
可用。
类似一些莫名其妙的报错,都可以从配置依赖版本入手