解決Cannot read property 'range' of null 錯誤

vue工程npm run serve/start/dev啓動時,node_modules文件報:Cannot read property 'range' of null 錯誤

改問題是"babel-eslint"版本更新問題致使的;html

給你們一個最簡單粗暴的解決方案:vue

 在項目裏找到對應的工程:直接刪除裏面的node_modules文件夾,而後從新npm install下就能夠了;node

node_modules文件內容較多,建議用cnpm install,會更快一點。 npm

從新install後能正常跑起來了.緩存

 

tips:babel

當清node_modules 出現某一些包錯誤時候,查不到緣由時候,能夠先清除緩存試試。spa

rm -rf node_modules
npm cache clean
npm install

npm cache clean // 暴力清緩存:npm cache clean --force eslint

相關文章
相關標籤/搜索