gpt4 book ai didi

javascript - 从 11 版本更新到 12 版本后,Angular 项目不起作用

转载 作者:行者123 更新时间:2023-12-04 14:56:34 35 4
gpt4 key购买 nike

我按照此步骤更新我的 Angular 项目。

npm cache clean --force 
npm uninstall @angular/cli@latest @angular/core@latest
npm install -g @angular/cli@latest @angular/core@latest

之后我删除了我的 node_modules 目录并执行了npm ci

最后npm 安装 node@latest

在所有这些之后,我开始了这个项目ng serve --host 192.168.1.155

但是我得到了以下错误:

Build at: 2021-06-06T13:14:39.792Z - Hash: 881d2a0f5195ee376bc8 - Time: 293719ms

Warning: C:\xampp\htdocs\schoolmanager\src\app\app.module.ts depends on 'ngx-localforage'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Warning: C:\xampp\htdocs\schoolmanager\src\app\components\dashboardprincipal\dashboardprincipal.component.ts depends on 'chart.js'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Warning: C:\xampp\htdocs\schoolmanager\src\app\services\file.service.ts depends on 'rxjs/Rx'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Warning: Unable to locate stylesheet: C:\xampp\htdocs\schoolmanager\assets\plugins\fontawesome-free\css\all.min.css

Warning: Unable to locate stylesheet: C:\xampp\htdocs\schoolmanager\assets\plugins\tempusdominus-bootstrap-4\css\tempusdominus-bootstrap-4.min.css

Warning: Unable to locate stylesheet: C:\xampp\htdocs\schoolmanager\https:\code.ionicframework.com\ionicons\2.0.1\css\ionicons.min.css

Warning: Unable to locate stylesheet: C:\xampp\htdocs\schoolmanager\assets\plugins\icheck-bootstrap\icheck-bootstrap.min.css

Warning: Unable to locate stylesheet: C:\xampp\htdocs\schoolmanager\assets\plugins\datatables-bs4\css\dataTables.bootstrap4.css

Warning: Unable to locate stylesheet: C:\xampp\htdocs\schoolmanager\assets\plugins\overlayScrollbars\css\OverlayScrollbars.min.css

Warning: Unable to locate stylesheet: C:\xampp\htdocs\schoolmanager\assets\plugins\select2\css\select2.min.css

Warning: Unable to locate stylesheet: C:\xampp\htdocs\schoolmanager\assets\plugins\select2-bootstrap4-theme\select2-bootstrap4.min.css

3mWarning: Unable to locate stylesheet: C:\xampp\htdocs\schoolmanager\assets\plugins\daterangepicker\daterangepicker.css

Warning: Unable to locate stylesheet: C:\xampp\htdocs\schoolmanager\assets\dist\css\adminlte.min.css

Warning: Unable to locate stylesheet: C:\xampp\htdocs\schoolmanager\assets\dist\css\adminlte.css

Warning: Unable to locate stylesheet: C:\xampp\htdocs\schoolmanager\assets\plugins\summernote\summernote-bs4.css

Warning: Unable to locate stylesheet: C:\xampp\htdocs\schoolmanager\assets\plugins\toastr\toastr.min.css

Warning: Unable to locate stylesheet: C:\xampp\htdocs\schoolmanager\assets\plugins\bootstrap4-duallistbox\bootstrap-duallistbox.min.css



Error: node_modules/ngx-localforage/dist/src/localforage.module.d.ts:5:21 - error TS2694: Namespace '"C:/xampp/htdocs/schoolmanager/node_modules/@angular/core/core"' has no exported member 'ɵɵNgModuleDefWithMeta'.

5 static ɵmod: i0.ɵɵNgModuleDefWithMeta<LocalForageModule, never, never, never>;
~~~~~~~~~~~~~~~~~~~~~


Error: node_modules/ngx-localforage/dist/src/localforage.service.d.ts:16:21 - error TS2694: Namespace '"C:/xampp/htdocs/schoolmanager/node_modules/@angular/core/core"'
has no exported member 'ɵɵFactoryDef'.

16 static ɵfac: i0.ɵɵFactoryDef<LocalForageService, never>;
~~~~~~~~~~~~


Error: node_modules/ngx-localforage/dist/src/localforage.service.d.ts:17:22 - error TS2724: '"C:/xampp/htdocs/schoolmanager/node_modules/@angular/core/core"' has no exported member named 'ɵɵInjectableDef'. Did you mean 'ɵgetInjectableDef'?

17 static ɵprov: i0.ɵɵInjectableDef<LocalForageService>;
~~~~~~~~~~~~~~~


assets/plugins/sweetalert2-theme-bootstrap-4/bootstrap-4.scss - Error: assets/plugins/sweetalert2-theme-bootstrap-4/bootstrap-4.scss from Css Minimizer
C:\xampp\htdocs\schoolmanager\assets\plugins\sweetalert2-theme-bootstrap-4\bootstrap-4.scss:14:4: Unknown word
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser [assets/plugins/sweetalert2-theme-bootstrap-4/bootstrap-4.scss:14,4]
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser
at Input.error (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\input.js:123:16)
at Parser.unknownWord (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parser.js:518:22)
at Parser.decl (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parser.js:201:16)
at Parser.other (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parser.js:115:18)
at Parser.parse (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parser.js:59:16)
at parse (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parse.js:11:12)
at new LazyResult (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\lazy-result.js:132:16)
at Processor.process (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\processor.js:34:12)
at cssnanoMinify (C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\dist\utils.js:58:61)
at minify (C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\dist\minify.js:15:32)
at C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\dist\index.js:262:128
at C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\node_modules\p-limit\index.js:23:31
at run (C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\node_modules\p-limit\index.js:23:43)
at C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\node_modules\p-limit\index.js:45:20
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:93:5)

assets/plugins/ion-rangeslider/less/irs.less - Error: assets/plugins/ion-rangeslider/less/irs.less from Css Minimizer
C:\xampp\htdocs\schoolmanager\assets\plugins\ion-rangeslider\less\irs.less:1:1: Unknown word
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser [assets/plugins/ion-rangeslider/less/irs.less:1,1]
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser
at Input.error (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\input.js:123:16)
at Parser.unknownWord (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parser.js:518:22)
at Parser.other (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parser.js:149:12)
at Parser.parse (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parser.js:59:16)
at parse (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parse.js:11:12)
at new LazyResult (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\lazy-result.js:132:16)
at Processor.process (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\processor.js:34:12)
at cssnanoMinify (C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\dist\utils.js:58:61)
at minify (C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\dist\minify.js:15:32)
at C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\dist\index.js:262:128
at C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\node_modules\p-limit\index.js:23:31
at run (C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\node_modules\p-limit\index.js:23:43)
at C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\node_modules\p-limit\index.js:45:20
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:93:5)

assets/plugins/ion-rangeslider/less/_base.less - Error: assets/plugins/ion-rangeslider/less/_base.less from Css Minimizer
C:\xampp\htdocs\schoolmanager\assets\plugins\ion-rangeslider\less\_base.less:4:5: Unknown word
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser [assets/plugins/ion-rangeslider/less/_base.less:4,5]
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser
at Input.error (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\input.js:123:16)
at Parser.unknownWord (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parser.js:518:22)
at Parser.other (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parser.js:149:12)
at Parser.parse (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parser.js:59:16)
at parse (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parse.js:11:12)
at new LazyResult (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\lazy-result.js:132:16)
at Processor.process (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\processor.js:34:12)
at cssnanoMinify (C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\dist\utils.js:58:61)
at minify (C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\dist\minify.js:15:32)
at C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\dist\index.js:262:128
at C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\node_modules\p-limit\index.js:23:31
at run (C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\node_modules\p-limit\index.js:23:43)
at C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\node_modules\p-limit\index.js:45:20
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:93:5)

assets/plugins/ion-rangeslider/less/skins/big.less - Error: assets/plugins/ion-rangeslider/less/skins/big.less from Css Minimizer
C:\xampp\htdocs\schoolmanager\assets\plugins\ion-rangeslider\less\skins\big.less:33:8: Unknown word
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser [assets/plugins/ion-rangeslider/less/skins/big.less:33,8]
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser
at Input.error (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\input.js:123:16)
at Parser.unknownWord (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parser.js:518:22)
at Parser.other (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parser.js:149:12)
at Parser.parse (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parser.js:59:16)
at parse (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parse.js:11:12)
at new LazyResult (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\lazy-result.js:132:16)
at Processor.process (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\processor.js:34:12)
at cssnanoMinify (C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\dist\utils.js:58:61)
at minify (C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\dist\minify.js:15:32)
at C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\dist\index.js:262:128
at C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\node_modules\p-limit\index.js:23:31
at run (C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\node_modules\p-limit\index.js:23:43)
at C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\node_modules\p-limit\index.js:45:20
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:93:5)

assets/plugins/ion-rangeslider/less/skins/flat.less - Error: assets/plugins/ion-rangeslider/less/skins/flat.less from Css Minimizer
C:\xampp\htdocs\schoolmanager\assets\plugins\ion-rangeslider\less\skins\flat.less:30:8: Unknown word
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser [assets/plugins/ion-rangeslider/less/skins/flat.less:30,8]
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser
at Input.error (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\input.js:123:16)
at Parser.unknownWord (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parser.js:518:22)
at Parser.other (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parser.js:149:12)
at Parser.parse (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parser.js:59:16)
at parse (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parse.js:11:12)
at new LazyResult (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\lazy-result.js:132:16)
at Processor.process (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\processor.js:34:12)
at cssnanoMinify (C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\dist\utils.js:58:61)
at minify (C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\dist\minify.js:15:32)
at C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\dist\index.js:262:128
at C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\node_modules\p-limit\index.js:23:31
at run (C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\node_modules\p-limit\index.js:23:43)
at C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\node_modules\p-limit\index.js:45:20
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:93:5)

assets/plugins/ion-rangeslider/less/skins/modern.less - Error: assets/plugins/ion-rangeslider/less/skins/modern.less from Css Minimizer
C:\xampp\htdocs\schoolmanager\assets\plugins\ion-rangeslider\less\skins\modern.less:30:8: Unknown word
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser [assets/plugins/ion-rangeslider/less/skins/modern.less:30,8]
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser
at Input.error (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\input.js:123:16)
at Parser.unknownWord (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parser.js:518:22)
at Parser.other (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parser.js:149:12)
at Parser.parse (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parser.js:59:16)
at parse (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parse.js:11:12)
at new LazyResult (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\lazy-result.js:132:16)
at Processor.process (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\processor.js:34:12)
at cssnanoMinify (C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\dist\utils.js:58:61)
at minify (C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\dist\minify.js:15:32)
at C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\dist\index.js:262:128
at C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\node_modules\p-limit\index.js:23:31
at run (C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\node_modules\p-limit\index.js:23:43)
at C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\node_modules\p-limit\index.js:45:20
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:93:5)

assets/plugins/ion-rangeslider/less/skins/round.less - Error: assets/plugins/ion-rangeslider/less/skins/round.less from Css Minimizer
C:\xampp\htdocs\schoolmanager\assets\plugins\ion-rangeslider\less\skins\round.less:33:8: Unknown word
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser [assets/plugins/ion-rangeslider/less/skins/round.less:33,8]
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser
at Input.error (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\input.js:123:16)
at Parser.unknownWord (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parser.js:518:22)
at Parser.other (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parser.js:149:12)
at Parser.parse (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parser.js:59:16)
at parse (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parse.js:11:12)
at new LazyResult (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\lazy-result.js:132:16)
at Processor.process (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\processor.js:34:12)
at cssnanoMinify (C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\dist\utils.js:58:61)
at minify (C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\dist\minify.js:15:32)
at C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\dist\index.js:262:128
at C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\node_modules\p-limit\index.js:23:31
at run (C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\node_modules\p-limit\index.js:23:43)
at C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\node_modules\p-limit\index.js:45:20
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:93:5)

assets/plugins/ion-rangeslider/less/skins/sharp.less - Error: assets/plugins/ion-rangeslider/less/skins/sharp.less from Css Minimizer
C:\xampp\htdocs\schoolmanager\assets\plugins\ion-rangeslider\less\skins\sharp.less:32:8: Unknown word
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser [assets/plugins/ion-rangeslider/less/skins/sharp.less:32,8]
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser
at Input.error (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\input.js:123:16)
at Parser.unknownWord (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parser.js:518:22)
at Parser.other (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parser.js:149:12)
at Parser.parse (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parser.js:59:16)
at parse (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parse.js:11:12)
at new LazyResult (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\lazy-result.js:132:16)
at Processor.process (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\processor.js:34:12)
at cssnanoMinify (C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\dist\utils.js:58:61)
at minify (C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\dist\minify.js:15:32)
at C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\dist\index.js:262:128
at C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\node_modules\p-limit\index.js:23:31
at run (C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\node_modules\p-limit\index.js:23:43)
at C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\node_modules\p-limit\index.js:45:20
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:93:5)

assets/plugins/ion-rangeslider/less/skins/square.less - Error: assets/plugins/ion-rangeslider/less/skins/square.less from Css Minimizer
C:\xampp\htdocs\schoolmanager\assets\plugins\ion-rangeslider\less\skins\square.less:33:8: Unknown word
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser [assets/plugins/ion-rangeslider/less/skins/square.less:33,8]
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser
at Input.error (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\input.js:123:16)
at Parser.unknownWord (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parser.js:518:22)
at Parser.other (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parser.js:149:12)
at Parser.parse (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parser.js:59:16)
at parse (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\parse.js:11:12)
at new LazyResult (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\lazy-result.js:132:16)
at Processor.process (C:\xampp\htdocs\schoolmanager\node_modules\postcss\lib\processor.js:34:12)
at cssnanoMinify (C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\dist\utils.js:58:61)
at minify (C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\dist\minify.js:15:32)
at C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\dist\index.js:262:128
at C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\node_modules\p-limit\index.js:23:31
at run (C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\node_modules\p-limit\index.js:23:43)
at C:\xampp\htdocs\schoolmanager\node_modules\css-minimizer-webpack-plugin\node_modules\p-limit\index.js:45:20
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:93:5)



** Angular Live Development Server is listening on 192.168.1.155:4200, open your browser on http://192.168.1.155:4200/ **

这是我的 Angular 版本

enter image description here

Node 版本 enter image description here

我的包.json

{
"name": "schoolmanager",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"postinstall": "ngcc"
},
"private": true,
"dependencies": {
"@angular-devkit/schematics": "^12.0.3",
"@angular/animations": "^12.0.3",
"@angular/cdk": "^11.2.13",
"@angular/common": "~12.0.3",
"@angular/compiler": "^12.0.3",
"@angular/flex-layout": "^11.0.0-beta.33",
"@angular/forms": "~12.0.3",
"@angular/material": "^11.2.13",
"@angular/platform-browser": "~12.0.3",
"@angular/platform-browser-dynamic": "~12.0.3",
"@angular/router": "~12.0.3",
"@ngx-translate/core": "^12.1.2",
"@ngx-translate/http-loader": "^4.0.0",
"angular-datatables": "^8.0.0",
"angular-dual-listbox": "^6.0.0",
"bn-ng-idle": "^1.0.1",
"bootstrap": "^5.0.1",
"chart.js": "^2.9.3",
"chartjs-plugin-datalabels": "^0.7.0",
"crypto-js": "^4.0.0",
"datatables.net": "^1.10.20",
"datatables.net-dt": "^1.10.20",
"dexie": "^3.0.3",
"dotenv": "^8.2.0",
"file-saver": "^2.0.2",
"flag-icon-css": "^3.4.6",
"jquery": "^3.5.0",
"jsonwebtoken": "^8.5.1",
"localforage": "^1.9.0",
"ng-starrating": "^1.0.20",
"ngx-bootstrap": "^5.6.1",
"ngx-localforage": "^9.0.1",
"ngx-material-timepicker": "^5.5.3",
"ngx-pagination": "^5.0.0",
"ngx-toastr": "^12.0.1",
"node": "^16.1.0",
"react-flag-icon-css": "^1.0.25",
"rxjs": "~6.5.4",
"rxjs-compat": "^6.5.4",
"tslib": "^2.0.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "~12.0.3",
"@angular/compiler-cli": "~12.0.3",
"@angular/language-service": "~12.0.3",
"@types/datatables.net": "^1.10.18",
"@types/dotenv": "^8.2.0",
"@types/jasmine": "~3.6.0",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^12.11.1",
"codelyzer": "^6.0.0",
"jasmine-core": "~3.6.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~6.3.3",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"protractor": "~7.0.0",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~4.2.4"
}
}

enter code here

npm 版本 enter image description here

有人可以帮帮我吗?现在我无法运行该项目。

非常感谢!

最佳答案

angular 团队做了很多工作来帮助版本迁移,并且有一个有用的 Angular Update Guide我发现它(虽然不完美)对于在许多主要版本上更新我的应用程序非常有用。

我注意到在他们的 instructions for updating from 11 to 12 , 它们表示您应该:

ng update @angular/core@12 @angular/cli@12

我建议您还原正在进行的更改并利用这些资源来实现更新。

关于javascript - 从 11 版本更新到 12 版本后,Angular 项目不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67859765/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com