vue新建项目报错:Cannot destructure property 'compile' of 'undefined' or 'null'

背景:新建vue项目,出现高危漏洞,需要更新,更新后编辑却出问题,咳咳,看来不能是漏洞都更新,毕竟其它内置不支持这更新版-。-

首先我们新建项目,下载

vue新建项目报错:Cannot destructure property 'compile' of 'undefined' or 'null'_第1张图片

npm install项目

vue新建项目报错:Cannot destructure property 'compile' of 'undefined' or 'null'_第2张图片

高危漏洞出现了,我们npm audit看看

vue新建项目报错:Cannot destructure property 'compile' of 'undefined' or 'null'_第3张图片

webpack-dev-server版本让更新,额走流程吧(PS,我们直接执行上一步的 npm audit fix 修复也是一样),会修复成功,然后npm run dev

vue新建项目报错:Cannot destructure property 'compile' of 'undefined' or 'null'_第4张图片

嗯,咱们npm run dev居然就报重点错误了:Cannot destructure property 'compile' of 'undefined' or 'null'

仔细想想,webpack-dev-server虽然更新,但是其他的依赖可能就没有支持3.1.10版本呀,唉,怎么办呢,用3.0.X或者在让修复高危漏洞就先不管,只要不是生产环境,开发环境不会有问题,等待依赖了再更新修复它也没事。

看...不修复就运行成功了。

vue新建项目报错:Cannot destructure property 'compile' of 'undefined' or 'null'_第5张图片

小墨记一篇提醒自己,鱼的记忆毕竟只有7s。

你可能感兴趣的:(小墨微记录)