Reputation: 151
Error on running angular 13 project. The Project builds fine but is not running on the browser. It gives the following console error:
Package.json
{
"name": "onlineorders",
"version": "8.7.0",
"license": "MIT",
"type": "module",
"angular-cli": {},
"scripts": {
"ng": "ng",
"publish": "gulp build && ng build --configuration production",
"start": "gulp buildDev && ng serve --host 0.0.0.0 --port 4200",
"hmr": "gulp buildDev && ng serve --host 0.0.0.0 --port 4200 --hmr",
"test": "gulp buildDev && ng test",
"pree2e": "webdriver-manager update --standalone false --gecko false",
"ng-high-memory": "gulp buildDev && node --max_old_space_size=2048 ng serve",
"e2e": "gulp buildDev && protractor",
"create-dynamic-bundles": "gulp buildDev",
"nswag": "cd nswag/ && refresh.bat"
},
"resolutions": {
"graceful-fs": "^4.2.4"
},
"private": false,
"dependencies": {
"@angular/animations": "^13.1.1",
"@angular/cdk": "13.1.1",
"@angular/common": "13.1.1",
"@angular/compiler": "^13.1.1",
"@angular/core": "13.1.1",
"@angular/forms": "13.1.1",
"@angular/platform-browser": "^13.1.1",
"@angular/platform-browser-dynamic": "^13.1.1",
"@angular/platform-server": "^13.1.1",
"@angular/router": "^13.1.1",
"@fullcalendar/core": "5.10.0",
"@microsoft/signalr": "5.0.11",
"@ng-select/ng-select": "^8.0.1",
"@swimlane/ngx-charts": "^18.0.1",
"abp-ng2-module": "^6.4.0",
"abp-web-resources": "^5.4.0",
"adal-angular": "^1.0.18",
"angular-gridster2": "^12.1.1",
"angular-oauth2-oidc": "^12.1.0",
"angular2-counto": "^1.2.5",
"angular2-text-mask": "^9.0.0",
"animate.css": "^4.1.1",
"chart.js": "^3.5.1",
"cookieconsent": "^3.1.1",
"core-js": "^3.18.3",
"cron-editor": "2.1.8",
"dwt": "17.1.12",
"famfamfam-flags": "^1.0.0",
"js-cookie": "^3.0.1",
"jspdf": "^2.4.0",
"just-compare": "^1.4.0",
"localforage": "^1.10.0",
"lodash": "^4.17.21",
"moment": "^2.29.1",
"moment-timezone": "^0.5.33",
"msal": "^1.4.14",
"ng2-file-upload": "^1.4.0",
"ngx-barcode": "^0.3.0",
"ngx-bootstrap": "^7.1.0",
"ngx-captcha": "^10.0.0",
"ngx-image-cropper": "^5.0.1",
"ngx-perfect-scrollbar": "^10.1.1",
"ngx-spinner": "^12.0.0",
"object-path": "^0.11.8",
"primeicons": "^4.1.0",
"primeng": "12.0.2",
"push.js": "^1.0.12",
"quill": "^1.3.7",
"rtl-detect": "^1.0.4",
"rxjs": "^6.5.4",
"simple-line-icons": "^2.5.5",
"sweetalert2": "^11.1.9",
"text-mask-addons": "^3.8.0",
"tslib": "^2.3.1",
"webdriver-manager": "^12.1.8",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "~13.1.2",
"@angular/cli": "^13.1.2",
"@angular/compiler-cli": "^13.1.1",
"@angularclass/hmr": "^3.0.0",
"@angularclass/hmr-loader": "^3.0.4",
"@types/dwt": "16.1.2",
"@types/googlemaps": "3.39.2",
"@types/jasmine": "~3.10.0",
"@types/jasminewd2": "^2.0.10",
"@types/lodash": "^4.14.176",
"@types/moment-timezone": "^0.5.13",
"@types/node": "^16.11.1",
"codelyzer": "^6.0.2",
"gulp": "^4.0.2",
"gulp-clean-css": "^4.3.0",
"gulp-concat": "^2.6.1",
"gulp-install": "^1.1.0",
"gulp-less": "^5.0.0",
"gulp-postcss": "^9.0.1",
"gulp-uglify": "^3.0.2",
"jasmine-core": "~3.10.0",
"jasmine-spec-reporter": "~7.0.0",
"karma": "~6.3.5",
"karma-chrome-launcher": "~3.1.0",
"karma-cli": "~2.0.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~4.0.1",
"karma-jasmine-html-reporter": "^1.5.0",
"merge-stream": "^2.0.0",
"nswag": "13.13.2",
"postcss-url": "^10.1.3",
"protractor": "~7.0.0",
"ts-node": "~10.3.0",
"tslib": "2.3.1",
"tslint": "~6.1.0",
"typescript": "4.5.4"
}
}
angular.json
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"abp-zero-template": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
"polyfills": "src/polyfills.ts",
"preserveSymlinks": true,
"assets": [
"src/assets",
"src/metronic",
"src/favicon.ico",
{
"glob": "abp.signalr-client.js",
"input": "node_modules/abp-web-resources/Abp/Framework/scripts/libs",
"output": "/assets/abp"
}
],
"styles": [
"node_modules/animate.css/animate.min.css",
"node_modules/quill/dist/quill.core.css",
"node_modules/quill/dist/quill.snow.css",
"node_modules/famfamfam-flags/dist/sprite/famfamfam-flags.css",
"node_modules/primeng/resources/primeng.min.css",
"node_modules/primeng/resources/themes/saga-blue/theme.css",
"node_modules/primeicons/primeicons.css",
"node_modules/sweetalert2/dist/sweetalert2.css",
"node_modules/cookieconsent/build/cookieconsent.min.css",
"src/assets/primeng/file-upload/css/primeng.file-upload.css",
"src/assets/primeng/autocomplete/css/primeng.autocomplete.css",
"src/assets/primeng/tree/css/primeng.tree.css",
"src/assets/primeng/context-menu/css/primeng.context-menu.css",
"src/assets/fonts/fonts-poppins.css",
"src/assets/fonts/fonts-roboto.css",
"src/assets/ngx-bootstrap/bs-datepicker.css",
"src/assets/metronic/vendors/global/vendors.bundle.css",
"src/app/shared/core.less",
"src/app/shared/layout/layout.less",
"node_modules/@ng-select/ng-select/themes/default.theme.css",
"src/styles.css"
],
"scripts": [
"node_modules/@microsoft/signalr/dist/browser/signalr.min.js",
"node_modules/localforage/dist/localforage.js",
"node_modules/moment/min/moment-with-locales.js",
"node_modules/moment-timezone/builds/moment-timezone-with-data.js",
"node_modules/push.js/bin/push.js",
"node_modules/quill/dist/quill.js",
"node_modules/sweetalert2/dist/sweetalert2.js",
"node_modules/cookieconsent/build/cookieconsent.min.js",
"node_modules/dwt/dist/dynamsoft.webtwain.min.js",
"src/assets/abp-web-resources/abp.js",
"src/assets/abp-web-resources/abp.sweet-alert.js",
"src/assets/abp-web-resources/abp.notify.js",
"src/assets/canvas-toBlob/canvas-toBlob.js",
"node_modules/abp-web-resources/Abp/Framework/scripts/libs/abp.moment.js",
"src/assets/metronic/vendors/global/vendors.bundle.js",
"src/assets/metronic/common/js/scripts.bundle.js"
],
"allowedCommonJsDependencies": [
"lodash",
"rxjs-compat",
"raf",
"@babel/runtime-corejs3",
"core-js/modules/es.promise.js",
"core-js/modules/web.dom-collections.iterator.js",
"chart.js",
"angular2-text-mask",
"ngx-barcode",
"rxjs/internal/operators/shareReplay",
"moment-timezone",
"moment/min/locales.min",
"rtl-detect"
],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": true,
"aot": true,
"sourceMap": true,
"optimization": false,
"namedChunks": true
},
"configurations": {
"hmr": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.hmr.ts"
}
]
},
"production": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"aot": true,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
]
}
},
"defaultConfiguration": ""
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "abp-zero-template:build"
},
"configurations": {
"hmr": {
"browserTarget": "abp-zero-template:build:hmr"
},
"production": {
"browserTarget": "abp-zero-template:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "abp-zero-template:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"tsConfig": "src/tsconfig.spec.json",
"main": "src/test.ts",
"karmaConfig": "./karma.conf.js",
"polyfills": "src/polyfills.ts",
"styles": [
"node_modules/animate.css/animate.min.css",
"node_modules/quill/dist/quill.core.css",
"node_modules/quill/dist/quill.snow.css",
"node_modules/famfamfam-flags/dist/sprite/famfamfam-flags.css",
"node_modules/primeng/resources/primeng.min.css",
"node_modules/primeng/resources/themes/saga-blue/theme.css",
"node_modules/primeicons/primeicons.css",
"node_modules/sweetalert2/dist/sweetalert2.css",
"node_modules/cookieconsent/build/cookieconsent.min.css",
"src/assets/primeng/file-upload/css/primeng.file-upload.css",
"src/assets/primeng/autocomplete/css/primeng.autocomplete.css",
"src/assets/primeng/tree/css/primeng.tree.css",
"src/assets/primeng/context-menu/css/primeng.context-menu.css",
"src/assets/fonts/fonts-poppins.css",
"src/assets/fonts/fonts-roboto.css",
"src/assets/ngx-bootstrap/bs-datepicker.css",
"src/assets/metronic/vendors/global/vendors.bundle.css",
"src/app/shared/core.less",
"src/app/shared/layout/layout.less",
"node_modules/@ng-select/themes/default.theme.css"
],
"scripts": [
"node_modules/@microsoft/signalr/dist/browser/signalr.min.js",
"node_modules/localforage/dist/localforage.js",
"node_modules/moment/min/moment-with-locales.js",
"node_modules/moment-timezone/builds/moment-timezone-with-data.js",
"node_modules/push.js/bin/push.js",
"node_modules/quill/dist/quill.js",
"node_modules/sweetalert2/dist/sweetalert2.js",
"node_modules/cookieconsent/build/cookieconsent.min.js",
"src/assets/abp-web-resources/abp.js",
"src/assets/abp-web-resources/abp.sweet-alert.js",
"src/assets/abp-web-resources/abp.notify.js",
"src/assets/canvas-toBlob/canvas-toBlob.js",
"node_modules/abp-web-resources/Abp/Framework/scripts/libs/abp.moment.js",
"src/assets/metronic/vendors/global/vendors.bundle.js",
"src/assets/metronic/common/js/scripts.bundle.js"
],
"assets": [
"src/assets",
"src/favicon.ico",
{
"glob": "abp.signalr-client.js",
"input": "node_modules/abp-web-resources/Abp/Framework/scripts/libs",
"output": "/assets/abp"
}
]
}
}
}
},
"abp-zero-template-e2e": {
"root": "",
"sourceRoot": "",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "./protractor.conf.js",
"devServerTarget": "abp-zero-template:serve",
"port": 4200
}
}
}
}
},
"defaultProject": "abp-zero-template",
"schematics": {
"@schematics/angular:component": {
"prefix": "app",
"style": "css"
},
"@schematics/angular:directive": {
"prefix": "app"
}
},
"cli": {
"analytics": false
}
}
tsconfig.json
{
"compilerOptions": {
"declaration": false,
"experimentalDecorators": true,
"lib": ["es6", "dom"],
"mapRoot": "./",
"module": "esnext",
"skipLibCheck": true,
"moduleResolution": "node",
"outDir": "../dist/out-tsc",
"sourceMap": true,
"target": "es2015",
"typeRoots": ["../node_modules/@types"],
"baseUrl": ".",
"paths": {
"@app/*": ["./app/*"],
"@account/*": ["./account/*"],
"@shared/*": ["./shared/*"],
"@node_modules/*": ["../node_modules/*"],
"@angular/*": ["../node_modules/@angular/*"],
"@metronic/*": ["./assets/metronic/*"]
}
},
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"strictTemplates": true,
"strictInputTypes": false,
"strictAttributeTypes": true,
"strictOutputEventTypes": false,
"strictDomEventTypes": true,
"strictLiteralTypes": true,
"strictInjectionParameters": true,
"enableIvy": true
}
}
Upvotes: 1
Views: 1166
Reputation: 3538
Your angular-devkit/build-angular
version is 13.1.2
while your angular
version is 13.1.1
You may be getting an error because of this difference. Can you sync the versions and try?
Upvotes: 1