vue 啟動報錯:TypeError: Cannot read property 'range' of null
問題原因為babel-lint版本過高問題導致。
解決方式:降低版本,比如7/8都可以。
修改package.json
...
"devDependencies": {
...
"babel-eslint": "^7.2.3",
...
}
...
網上一說以下解決方式,試過並無效果。
當清node_modules 出現某一些包錯誤時候,查不到原因時候,可以先清除緩存試試。
rm -rf node_modules
npm cache clean
npm install
npm cache clean // 暴力清緩存:npm cache clean --force