我删除了.next和node_modules文件夹(只是做了实验),然后尝试执行npm i。我得到了以下错误:
$ npm i
npm ERR! code ENOLOCAL
npm ERR! Could not install from "node_modules/eth-sig-util/ethereumjs-abi@git+https:/github.com/ethereumjs/ethereumjs-abi.git" as it does not contain a package.json file.有决议吗?
发布于 2022-04-15 07:16:56
所以,罪魁祸首是肮脏的package-lock.json文件。我只是使用git reset --hard重置我的回购,以便package-lock.json达到最后的工作状态。(请谨慎使用git reset --hard;建议首先使用git stash保存WIP!)
在此之后,运行npm i没有出现错误。
发布于 2022-04-15 07:20:46
https://stackoverflow.com/questions/71881145
复制相似问题