angular - NGRX - 如何修复“在您的 package-lock.json 中发现错误”?
问题描述
我在带有 NGRX 的 NX 工作区中使用 Angular 并想在 Jenkins 中构建它,但运行后出现错误npm install
。
任何人在运行后都会看到这样的错误:
nx update
&& then npm run audit
??
npm ERR! code ELOCKVERIFY
npm ERR! Errors were found in your package-lock.json, run npm install to fix them.
npm ERR! Invalid: lock file's @ngrx/schematics@10.1.0 does not satisfy @ngrx/schematics@10.0.0
npm ERR! Invalid: lock file's @ngrx/store-devtools@10.1.0 does not satisfy @ngrx/store-devtools@10.0.0
实际的应用程序运行良好 - 使用nx serve
我想修复错误,这样我就可以运行我的 Jenkins 工作。有什么建议吗?
解决方案
如您所见,您在package.json
和之间存在版本差异package-lock.json
。
删除package-lock.json
并npm i
再次运行。