报错信息
Uncaught Error: Module parse failed: Unexpected token (1:5)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
> diff a/src/service/rules/outProtocol/gwkdryRule4Integration.js b/src/service/rules/outProtocol/gwkdryRule4Integration.js (rejected hunks)
| @@ -4,17 +4,26 @@
| /***
at 0617 (app.e5f297cc.js:1:68277)
at l (runtime.5d6ecd1b.js:1:567)
at o (app.e5f297cc.js:3:104605)
at app.e5f297cc.js:1:1687381
at Array.forEach (<anonymous>)
at Module.afda (app.e5f297cc.js:1:1687336)
at l (runtime.5d6ecd1b.js:1:567)
at o (app.e5f297cc.js:1:1873119)
at app.e5f297cc.js:1:635568
at Array.forEach (<anonymous>)
分析
- 这个原因是因为我在回退代码的时候,有冲突,然后idea给我生成了一个一样的文件,导致在编辑运行的时候造成了编译冲突形成的一个错误。
- 我们可以看到上面有两个gwkdryRule4Integration.js文件,只要找到它看是否有相同名的两个文件,删除idea帮我们删除的冲突对比文件。再重新编辑。
解决
通过上面的分析,我已经知道问题所在,我只要删除冲突文件,重新运行即可。