vue工程npm run serve/start/dev启动时,node_modules文件报:Cannot read property 'range' of null 错误
改问题是"babel-eslint"版本更新问题导致的;
给大家一个最简单粗暴的解决方案:
在项目里找到对应的工程:直接删除里面的node_modules文件夹,然后重新npm install下就可以了;
node_modules文件内容较多,建议用cnpm install,会更快一点。
重新install后能正常跑起来了.
tips:
当清node_modules 出现某一些包错误时候,查不到原因时候,可以先清除缓存试试。
rm -rf node_modules
npm cache clean
npm install
npm cache clean // 暴力清缓存:npm cache clean --force
生活不易,请继续努力,在未来的路上,愿你步伐坚定且内心温柔。——ziChin