我将https://update.angular.io/#8.0:9.0的应用程序从8角升级到9角
此后,我尝试 ng服务,但是它被卡在 13%的25/26个模块中,其中1个处于活动状态...已嵌入
我已经尝试删除node_module,然后再次安装npm,但是它不起作用 没有错误,我该怎么办?
package.json:
{
"name": "tms-all-new",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "~9.1.4",
"@angular/common": "~9.1.4",
"@angular/compiler": "~9.1.4",
"@angular/core": "~9.1.4",
"@angular/forms": "~9.1.4",
"@angular/platform-browser": "~9.1.4",
"@angular/platform-browser-dynamic": "~9.1.4",
"@angular/router": "~9.1.4",
"@ngx-loading-bar/core": "^4.2.0",
"@ngx-loading-bar/router": "^4.2.0",
"@types/chart.js": "^2.7.48",
"angular-mydatepicker": "^0.4.0",
"chart.js": "^2.9.3",
"chartjs-plugin-datalabels": "^0.7.0",
"fullcalendar": "^3.10.0",
"fullcalendar-scheduler": "^1.9.4",
"leaflet-geosearch": "^2.7.0",
"moment": "^2.24.0",
"rxjs": "~6.5.5",
"tslib": "^1.10.0",
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.901.4",
"@angular/cli": "~9.1.4",
"@angular/compiler-cli": "~9.1.4",
"@angular/language-service": "~9.1.4",
"@types/node": "^12.11.1",
"@types/jasmine": "~3.3.8",
"@types/jasminewd2": "~2.0.3",
"codelyzer": "^5.1.2",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"protractor": "~5.4.0",
"ts-node": "~7.0.0",
"tslint": "~5.15.0",
"typescript": "~3.8.3"
}
}
angular.json:
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"adminlte3": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/adminlte3",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": true,
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.scss",
"src/assets/plugins/fontawesome-free/css/all.min.css",
"src/assets/dist/css/adminlte.css",
"src/assets/plugins/overlayScrollbars/css/OverlayScrollbars.min.css",
"src/assets/plugins/datatables-bs4/css/dataTables.bootstrap4.min.css",
"src/assets/plugins/datatables-responsive/css/responsive.bootstrap4.min.css",
"src/assets/plugins/sweetalert2/sweetalert2.min.css",
"src/assets/plugins/sweetalert2-theme-bootstrap-4/bootstrap-4.min.css",
"src/assets/dist/css/bootstrap-datetimepicker.css",
"./node_modules/fullcalendar/dist/fullcalendar.css",
"./node_modules/fullcalendar-scheduler/dist/scheduler.css"
],
"scripts": [
"src/assets/plugins/jquery/jquery.min.js",
"./node_modules/moment/moment.js",
"./node_modules/moment/locale/th.js",
"src/assets/plugins/bootstrap/js/bootstrap.bundle.min.js",
"src/assets/dist/js/adminlte.min.js",
"src/assets/plugins/overlayScrollbars/js/jquery.overlayScrollbars.min.js",
"src/assets/plugins/datatables/jquery.dataTables.min.js",
"src/assets/plugins/datatables-bs4/js/dataTables.bootstrap4.min.js",
"src/assets/plugins/datatables-responsive/js/dataTables.responsive.min.js",
"src/assets/plugins/datatables-responsive/js/responsive.bootstrap4.min.js",
"src/assets/plugins/sweetalert2/sweetalert2.min.js",
"src/assets/dist/js/bootstrap-datetimepicker.js",
"src/assets/dist/js/bootstrap-datetimepicker.th.js",
"./node_modules/fullcalendar/dist/fullcalendar.js",
"./node_modules/fullcalendar-scheduler/dist/scheduler.js",
"./node_modules/fullcalendar/dist/locale/th.js"
]
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "adminlte3:build"
},
"configurations": {
"production": {
"browserTarget": "adminlte3:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "adminlte3:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.scss"
],
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"tsconfig.app.json",
"tsconfig.spec.json",
"e2e/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
]
}
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "adminlte3:serve"
},
"configurations": {
"production": {
"devServerTarget": "adminlte3:serve:production"
}
}
}
}
}},
"defaultProject": "adminlte3"
}
tsconfig.json:
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"module": "esnext",
"moduleResolution": "node",
"importHelpers": true,
"target": "es2015",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2018",
"dom"
]
},
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true
}
}
答案 0 :(得分:0)
尝试以下步骤: