vue项目动态菜单import运行报错【转】

发布时间 2023-07-05 10:32:19作者: L`G

Module build failed (from ./node_modules/@vue/cli-plugin-eslint/node_modules/eslint-loader/index.js):
TypeError: Cannot read property ‘range’ of null

 

1.从git拉取的项目,下载依赖后就报Module build failed (from ./node_modules/@vue/cli-plugin-eslint/node_modules/eslint-loader/index.js):
TypeError: Cannot read property ‘range’ of null
2.从网上找了许多方法,都没有解决问题。
3.我的解决方法:
将.eslintrc.js文件里的内容全部注释掉,运行 npm run dev;看看是否还报错,无报错再将注释去掉,再运行一次,项目正常运行,无报错。
试了很多方法都不行,也算瞎猫碰到死耗子了

参考网址:https://blog.csdn.net/weixin_40752032/article/details/106334689

感谢原作者