Could not install from ""as it does not contain a package.json file

4,461 阅读1分钟

近日做项目从git上拉下代码来安装依赖 npm install 时总是报错:

Could not install from "node_modules\jspdf\file-saver@github:eligrey\FileSaver.js#e865e37af9f9947ddcced76b549e27dc45c1cb2e" as it does not contain a package.json file

ok, 看起来是jspdf的问题,从网上查了说要更换npm 中package.json的repositry的一个路径,不敢改呀,所以就把jspdf在自己项目package.json中的jspdf信息删除:

删除之后再执行: npm install

惊喜就来啦。。。