在项目中引入动态路由时报错
写法:
![](https://img-blog.csdnimg.cn/img_convert/3e569ead0261be2600fe2f17af2027dc.png)
报错: Module build failed (from ./node_modules/_eslint-loader@2.2.1@eslint-loader/index.js): TypeError: Cannot read property 'range' of null
![](https://img-blog.csdnimg.cn/img_convert/e93005a2d5a662b5681e12c67ceb642b.png)
这是因为eslint安装包的问题,把babel-eslint安装包的版本换成稳定版7.2.3就好了,如果删包重新下载出现其他一些问题,可能是删包不彻底,建议关闭项目手动删除node_modules文件,如果是用命令删除,需要清除缓存。
![](https://img-blog.csdnimg.cn/img_convert/46a91d13b54a9588169e73341402fb32.png)