我按照以下步骤更新了我的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 install node@latest
在所有这些之后,我开始了这个项目ng serve --host 192.168.1.155
但我得到了以下错误:
Build at: 2021-06-06T13:14:39.792Z - Hash: 881d2a0f5195ee376bc8 - Time: 293719ms
Warning: C:xampphtdocsschoolmanagersrcappapp.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:xampphtdocsschoolmanagersrcappcomponentsdashboardprincipaldashboardprincipal.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:xampphtdocsschoolmanagersrcappservicesfile.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:xampphtdocsschoolmanagerassetspluginsfontawesome-freecssall.min.css
Warning: Unable to locate stylesheet: C:xampphtdocsschoolmanagerassetspluginstempusdominus-bootstrap-4csstempusdominus-bootstrap-4.min.css
Warning: Unable to locate stylesheet: C:xampphtdocsschoolmanagerhttps:code.ionicframework.comionicons2.0.1cssionicons.min.css
Warning: Unable to locate stylesheet: C:xampphtdocsschoolmanagerassetspluginsicheck-bootstrapicheck-bootstrap.min.css
Warning: Unable to locate stylesheet: C:xampphtdocsschoolmanagerassetspluginsdatatables-bs4cssdataTables.bootstrap4.css
Warning: Unable to locate stylesheet: C:xampphtdocsschoolmanagerassetspluginsoverlayScrollbarscssOverlayScrollbars.min.css
Warning: Unable to locate stylesheet: C:xampphtdocsschoolmanagerassetspluginsselect2cssselect2.min.css
Warning: Unable to locate stylesheet: C:xampphtdocsschoolmanagerassetspluginsselect2-bootstrap4-themeselect2-bootstrap4.min.css
3mWarning: Unable to locate stylesheet: C:xampphtdocsschoolmanagerassetspluginsdaterangepickerdaterangepicker.css
Warning: Unable to locate stylesheet: C:xampphtdocsschoolmanagerassetsdistcssadminlte.min.css
Warning: Unable to locate stylesheet: C:xampphtdocsschoolmanagerassetsdistcssadminlte.css
Warning: Unable to locate stylesheet: C:xampphtdocsschoolmanagerassetspluginssummernotesummernote-bs4.css
Warning: Unable to locate stylesheet: C:xampphtdocsschoolmanagerassetspluginstoastrtoastr.min.css
Warning: Unable to locate stylesheet: C:xampphtdocsschoolmanagerassetspluginsbootstrap4-duallistboxbootstrap-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:xampphtdocsschoolmanagerassetspluginssweetalert2-theme-bootstrap-4bootstrap-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:xampphtdocsschoolmanagernode_modulespostcsslibinput.js:123:16)
at Parser.unknownWord (C:xampphtdocsschoolmanagernode_modulespostcsslibparser.js:518:22)
at Parser.decl (C:xampphtdocsschoolmanagernode_modulespostcsslibparser.js:201:16)
at Parser.other (C:xampphtdocsschoolmanagernode_modulespostcsslibparser.js:115:18)
at Parser.parse (C:xampphtdocsschoolmanagernode_modulespostcsslibparser.js:59:16)
at parse (C:xampphtdocsschoolmanagernode_modulespostcsslibparse.js:11:12)
at new LazyResult (C:xampphtdocsschoolmanagernode_modulespostcssliblazy-result.js:132:16)
at Processor.process (C:xampphtdocsschoolmanagernode_modulespostcsslibprocessor.js:34:12)
at cssnanoMinify (C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-plugindistutils.js:58:61)
at minify (C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-plugindistminify.js:15:32)
at C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-plugindistindex.js:262:128
at C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-pluginnode_modulesp-limitindex.js:23:31
at run (C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-pluginnode_modulesp-limitindex.js:23:43)
at C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-pluginnode_modulesp-limitindex.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:xampphtdocsschoolmanagerassetspluginsion-rangesliderlessirs.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:xampphtdocsschoolmanagernode_modulespostcsslibinput.js:123:16)
at Parser.unknownWord (C:xampphtdocsschoolmanagernode_modulespostcsslibparser.js:518:22)
at Parser.other (C:xampphtdocsschoolmanagernode_modulespostcsslibparser.js:149:12)
at Parser.parse (C:xampphtdocsschoolmanagernode_modulespostcsslibparser.js:59:16)
at parse (C:xampphtdocsschoolmanagernode_modulespostcsslibparse.js:11:12)
at new LazyResult (C:xampphtdocsschoolmanagernode_modulespostcssliblazy-result.js:132:16)
at Processor.process (C:xampphtdocsschoolmanagernode_modulespostcsslibprocessor.js:34:12)
at cssnanoMinify (C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-plugindistutils.js:58:61)
at minify (C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-plugindistminify.js:15:32)
at C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-plugindistindex.js:262:128
at C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-pluginnode_modulesp-limitindex.js:23:31
at run (C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-pluginnode_modulesp-limitindex.js:23:43)
at C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-pluginnode_modulesp-limitindex.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:xampphtdocsschoolmanagerassetspluginsion-rangesliderless_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:xampphtdocsschoolmanagernode_modulespostcsslibinput.js:123:16)
at Parser.unknownWord (C:xampphtdocsschoolmanagernode_modulespostcsslibparser.js:518:22)
at Parser.other (C:xampphtdocsschoolmanagernode_modulespostcsslibparser.js:149:12)
at Parser.parse (C:xampphtdocsschoolmanagernode_modulespostcsslibparser.js:59:16)
at parse (C:xampphtdocsschoolmanagernode_modulespostcsslibparse.js:11:12)
at new LazyResult (C:xampphtdocsschoolmanagernode_modulespostcssliblazy-result.js:132:16)
at Processor.process (C:xampphtdocsschoolmanagernode_modulespostcsslibprocessor.js:34:12)
at cssnanoMinify (C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-plugindistutils.js:58:61)
at minify (C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-plugindistminify.js:15:32)
at C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-plugindistindex.js:262:128
at C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-pluginnode_modulesp-limitindex.js:23:31
at run (C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-pluginnode_modulesp-limitindex.js:23:43)
at C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-pluginnode_modulesp-limitindex.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:xampphtdocsschoolmanagerassetspluginsion-rangesliderlessskinsbig.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:xampphtdocsschoolmanagernode_modulespostcsslibinput.js:123:16)
at Parser.unknownWord (C:xampphtdocsschoolmanagernode_modulespostcsslibparser.js:518:22)
at Parser.other (C:xampphtdocsschoolmanagernode_modulespostcsslibparser.js:149:12)
at Parser.parse (C:xampphtdocsschoolmanagernode_modulespostcsslibparser.js:59:16)
at parse (C:xampphtdocsschoolmanagernode_modulespostcsslibparse.js:11:12)
at new LazyResult (C:xampphtdocsschoolmanagernode_modulespostcssliblazy-result.js:132:16)
at Processor.process (C:xampphtdocsschoolmanagernode_modulespostcsslibprocessor.js:34:12)
at cssnanoMinify (C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-plugindistutils.js:58:61)
at minify (C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-plugindistminify.js:15:32)
at C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-plugindistindex.js:262:128
at C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-pluginnode_modulesp-limitindex.js:23:31
at run (C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-pluginnode_modulesp-limitindex.js:23:43)
at C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-pluginnode_modulesp-limitindex.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:xampphtdocsschoolmanagerassetspluginsion-rangesliderlessskinsflat.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:xampphtdocsschoolmanagernode_modulespostcsslibinput.js:123:16)
at Parser.unknownWord (C:xampphtdocsschoolmanagernode_modulespostcsslibparser.js:518:22)
at Parser.other (C:xampphtdocsschoolmanagernode_modulespostcsslibparser.js:149:12)
at Parser.parse (C:xampphtdocsschoolmanagernode_modulespostcsslibparser.js:59:16)
at parse (C:xampphtdocsschoolmanagernode_modulespostcsslibparse.js:11:12)
at new LazyResult (C:xampphtdocsschoolmanagernode_modulespostcssliblazy-result.js:132:16)
at Processor.process (C:xampphtdocsschoolmanagernode_modulespostcsslibprocessor.js:34:12)
at cssnanoMinify (C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-plugindistutils.js:58:61)
at minify (C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-plugindistminify.js:15:32)
at C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-plugindistindex.js:262:128
at C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-pluginnode_modulesp-limitindex.js:23:31
at run (C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-pluginnode_modulesp-limitindex.js:23:43)
at C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-pluginnode_modulesp-limitindex.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:xampphtdocsschoolmanagerassetspluginsion-rangesliderlessskinsmodern.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:xampphtdocsschoolmanagernode_modulespostcsslibinput.js:123:16)
at Parser.unknownWord (C:xampphtdocsschoolmanagernode_modulespostcsslibparser.js:518:22)
at Parser.other (C:xampphtdocsschoolmanagernode_modulespostcsslibparser.js:149:12)
at Parser.parse (C:xampphtdocsschoolmanagernode_modulespostcsslibparser.js:59:16)
at parse (C:xampphtdocsschoolmanagernode_modulespostcsslibparse.js:11:12)
at new LazyResult (C:xampphtdocsschoolmanagernode_modulespostcssliblazy-result.js:132:16)
at Processor.process (C:xampphtdocsschoolmanagernode_modulespostcsslibprocessor.js:34:12)
at cssnanoMinify (C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-plugindistutils.js:58:61)
at minify (C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-plugindistminify.js:15:32)
at C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-plugindistindex.js:262:128
at C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-pluginnode_modulesp-limitindex.js:23:31
at run (C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-pluginnode_modulesp-limitindex.js:23:43)
at C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-pluginnode_modulesp-limitindex.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:xampphtdocsschoolmanagerassetspluginsion-rangesliderlessskinsround.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:xampphtdocsschoolmanagernode_modulespostcsslibinput.js:123:16)
at Parser.unknownWord (C:xampphtdocsschoolmanagernode_modulespostcsslibparser.js:518:22)
at Parser.other (C:xampphtdocsschoolmanagernode_modulespostcsslibparser.js:149:12)
at Parser.parse (C:xampphtdocsschoolmanagernode_modulespostcsslibparser.js:59:16)
at parse (C:xampphtdocsschoolmanagernode_modulespostcsslibparse.js:11:12)
at new LazyResult (C:xampphtdocsschoolmanagernode_modulespostcssliblazy-result.js:132:16)
at Processor.process (C:xampphtdocsschoolmanagernode_modulespostcsslibprocessor.js:34:12)
at cssnanoMinify (C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-plugindistutils.js:58:61)
at minify (C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-plugindistminify.js:15:32)
at C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-plugindistindex.js:262:128
at C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-pluginnode_modulesp-limitindex.js:23:31
at run (C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-pluginnode_modulesp-limitindex.js:23:43)
at C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-pluginnode_modulesp-limitindex.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:xampphtdocsschoolmanagerassetspluginsion-rangesliderlessskinssharp.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:xampphtdocsschoolmanagernode_modulespostcsslibinput.js:123:16)
at Parser.unknownWord (C:xampphtdocsschoolmanagernode_modulespostcsslibparser.js:518:22)
at Parser.other (C:xampphtdocsschoolmanagernode_modulespostcsslibparser.js:149:12)
at Parser.parse (C:xampphtdocsschoolmanagernode_modulespostcsslibparser.js:59:16)
at parse (C:xampphtdocsschoolmanagernode_modulespostcsslibparse.js:11:12)
at new LazyResult (C:xampphtdocsschoolmanagernode_modulespostcssliblazy-result.js:132:16)
at Processor.process (C:xampphtdocsschoolmanagernode_modulespostcsslibprocessor.js:34:12)
at cssnanoMinify (C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-plugindistutils.js:58:61)
at minify (C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-plugindistminify.js:15:32)
at C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-plugindistindex.js:262:128
at C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-pluginnode_modulesp-limitindex.js:23:31
at run (C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-pluginnode_modulesp-limitindex.js:23:43)
at C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-pluginnode_modulesp-limitindex.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:xampphtdocsschoolmanagerassetspluginsion-rangesliderlessskinssquare.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:xampphtdocsschoolmanagernode_modulespostcsslibinput.js:123:16)
at Parser.unknownWord (C:xampphtdocsschoolmanagernode_modulespostcsslibparser.js:518:22)
at Parser.other (C:xampphtdocsschoolmanagernode_modulespostcsslibparser.js:149:12)
at Parser.parse (C:xampphtdocsschoolmanagernode_modulespostcsslibparser.js:59:16)
at parse (C:xampphtdocsschoolmanagernode_modulespostcsslibparse.js:11:12)
at new LazyResult (C:xampphtdocsschoolmanagernode_modulespostcssliblazy-result.js:132:16)
at Processor.process (C:xampphtdocsschoolmanagernode_modulespostcsslibprocessor.js:34:12)
at cssnanoMinify (C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-plugindistutils.js:58:61)
at minify (C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-plugindistminify.js:15:32)
at C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-plugindistindex.js:262:128
at C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-pluginnode_modulesp-limitindex.js:23:31
at run (C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-pluginnode_modulesp-limitindex.js:23:43)
at C:xampphtdocsschoolmanagernode_modulescss-minimizer-webpack-pluginnode_modulesp-limitindex.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/ **
这是我的角度版
在此处输入图像描述
节点版本在此处输入图像描述
我的包.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版本在此处输入图像描述
有人能帮我吗?现在我无法运行该项目。
非常感谢!
angular团队做了很多工作来帮助版本迁移,并且有一个有用的angular Update Guide,我发现它很有用(虽然不完美(,在许多主要版本上更新我的应用程序时非常有用。
我注意到,在他们从11更新到12的说明中,他们指出你应该:
ng update @angular/core@12 @angular/cli@12
我建议您恢复正在进行的更改,并利用这些资源进行更新。
我建议恢复到版本11-当我升级到版本12时,遇到了很多错误,尤其是scs,我最终评论掉了我的一些东西。。。v12的构建也需要一段时间。
如果你在版本11-不要太快升级
尝试删除yarn.lock
并重新安装你也可以参考这个链接,https://classic.yarnpkg.com/en/docs/yarn-lock/