npm run dev 启动报错:TypeError: Cannot read property ‘range‘ of null

      发布在:个人笔记      评论:0 条评论
<p>npm run dev 启动报错:TypeError: Cannot read property ‘range‘ of null</p><p><img src="http://img.80zx.com/ueditor/image/202410/1727797244676fb3.png" title="range" alt="range"/></p><p>有可能是babel-lint版本过高问题导致。</p><p>可以在项目根目录下查看package.json文件,查看babel-eslint的版本:</p><p>在这里插入图片描述</p><p>高版本插件一般容易出错,最稳妥的方法就是降低本地插件版本,使用稳定版进行开发</p><p><span style="color: rgb(77, 77, 77); font-family: -apple-system, &quot;SF UI Text&quot;, Arial, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;WenQuanYi Micro Hei&quot;, sans-serif; font-size: 16px; font-variant-ligatures: no-common-ligatures; text-wrap: wrap; background-color: rgb(255, 255, 255);">解决方法在终端执行<strong>npm install babel-eslint@7.2.3 </strong>,安装babel-eslint稳定版;</span></p><p><span style="color: rgb(77, 77, 77); font-family: -apple-system, &quot;SF UI Text&quot;, Arial, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, &quot;WenQuanYi Micro Hei&quot;, sans-serif; font-size: 16px; font-variant-ligatures: no-common-ligatures; text-wrap: wrap; background-color: rgb(255, 255, 255);">再次执行npm run dev 启动成功</span></p><p><br/></p>
热门推荐