我试图将项目从Angular 9.1迁移到Angular 10,并且每当我尝试使用时
ng update @angular/core @angular/cli
弹出以下期望:
An unhandled exception occurred: Cannot find module 'lru-cache'
Require stack:
- C:\Users\user\projects\app-rt\node_modules\@npmcli\git\lib\revs.js
- C:\Users\user\projects\app-rt\node_modules\@npmcli\git\lib\clone.js
- C:\Users\user\projects\app-rt\node_modules\@npmcli\git\lib\index.js
- C:\Users\user\projects\app-rt\node_modules\pacote\lib\git.js
- C:\Users\user\projects\app-rt\node_modules\pacote\lib\fetcher.js
- C:\Users\user\projects\app-rt\node_modules\pacote\lib\index.js
- C:\Users\user\projects\app-rt\node_modules\@angular\cli\utilities\package-metadata.js
- C:\Users\user\projects\app-rt\node_modules\@angular\cli\commands\update-impl.js
- C:\Users\user\projects\app-rt\node_modules\@angular-devkit\schematics\tools\export-ref.js
- C:\Users\user\projects\app-rt\node_modules\@angular-devkit\schematics\tools\index.js
- C:\Users\user\projects\app-rt\node_modules\@angular\cli\utilities\json-schema.js
- C:\Users\user\projects\app-rt\node_modules\@angular\cli\models\command-runner.js
- C:\Users\user\projects\app-rt\node_modules\@angular\cli\lib\cli\index.js
- C:\Users\user\projects\app-rt\node_modules\@angular\cli\lib\init.js
- C:\Users\user\projects\app-rt\node_modules\@angular\cli\bin\ng
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:980:15)
at Function.Module._load (internal/modules/cjs/loader.js:862:27)
at Module.require (internal/modules/cjs/loader.js:1042:19)
at require (internal/modules/cjs/helpers.js:77:18)
at Object.<anonymous> (C:\Users\user\projects\app-rt\node_modules\@npmcli\git\lib\revs.js:3:13)
at Module._compile (internal/modules/cjs/loader.js:1156:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14)
at Module.require (internal/modules/cjs/loader.js:1042:19)
at require (internal/modules/cjs/helpers.js:77:18)
at Object.<anonymous> (C:\Users\user\projects\app-rt\node_modules\@npmcli\git\lib\clone.js:23:14)
at Module._compile (internal/modules/cjs/loader.js:1156:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14)
到目前为止,还有其他人遇到吗? 到目前为止,我尝试使用本地克隆,使用来自GitHub的新克隆,尝试删除“ Node_Modules”,尝试在未安装任何软件包的情况下执行更新,并安装了所有软件包并保持最新。还是一无所有。
我曾尝试寻找其他遇到此问题的人,但到目前为止,“ lru-cache”仅在其他框架中显示,所以我看不出问题出在哪里。