从Coding上clone项目,运行npm run dev报错,
然后发现是依赖没下好,再运行npm install继续报错,截图如下:
去网上搜索发现解决方法:
来自飞奔的波大爷
报错代码:
npm ERR! Unexpected end of JSON input while parsing near '...,"version":"0.4.1","d'
这个不晓得原因,但是解决办法是 清一下栈:
npm cache clean --force
报错代码
npm ERR! A complete log of this run can be found in:
原因:全局的脚手架和本地的脚手架版本不一样
解决:
尝试更新版本,淘宝镜像命令:
cnpm install npm -g
貌似还是报错,
换一个
npm install npm -g
不报错了,然后再试npm i
不报错了
然后运行npm run dev
即可