更新时间:2022-06-20 10:06:33
我遇到了同样的问题,并且对我有用:
I had the same issue and this worked for me:
删除这些文件/文件夹(从Angular根文件夹中):
Delete these files/ folders (from your Angular root folder):
package-lock.json
(不是 package.json)/node_modules
文件夹/dist
文件夹package-lock.json
(Not the package.json)/node_modules
folder/dist
folder执行命令(重新生成package-lock.json
和/node_modules
):
Execute command (regenerate the package-lock.json
and the /node_modules
):
$npm install
现在一切正常,是package-lock.json
导致npm下载旧版本的依赖项.
Everything should work now, it was the package-lock.json
that caused npm to download old versions of dependencies.