0

try to run the app this error appear

here is my package.json:

{"dependencies": {
"@agm/core": "^1.1.0",
"@angular/animations": "^10.2.5",
"@angular/cdk": "~10.2.7",
"@angular/common": "^10.2.5",
"@angular/compiler": "^10.2.5",
"@angular/core": "^10.2.5",
"@angular/forms": "^10.2.5",
"@angular/material": "^10.2.7",
"@angular/platform-browser": "^10.2.5",
"@angular/platform-browser-dynamic": "^10.2.5",
"@angular/router": "^10.2.5",
"@devexpress/analytics-core": "^19.2.8",
"@ng-bootstrap/ng-bootstrap": "^8.0.3",
"@ngx-translate/core": "^11.0.1",
"@ngx-translate/http-loader": "^4.0.0",
"@swimlane/ngx-charts": "^7.0.1",
"@swimlane/ngx-datatable": "^15.0.2",
"angular-calendar": "^0.25.2",
"angular-file-uploader": "^5.0.2",
"angular-notifier": "^8.0.0",
"bootstrap": "^4.5.0",
"c3": "^0.4.24",
"core-js": "^2.6.11",
"d3": "^4.8.0",
"devexpress-reporting": "^19.2.8",
"devexpress-reporting-angular": "^19.2.8",
"devextreme": "^19.2.8",
"file-saver": "^2.0.5",
"jquery": "^3.5.1",
"lodash": "^4.17.21",
"ng-chartist": "^1.1.1",
"ng-multiselect-dropdown": "^0.2.10",
"ng-zorro-antd": "^9.1.1",
"ng2-dragula": "^2.1.1",
"ngx-autosize": "^1.8.0",
"ngx-pagination": "^5.0.0",
"ngx-perfect-scrollbar": "6.1.0",
"ngx-toastr": "^8.10.2",
"os": "^0.1.1",
"pace-js": "^1.0.2",
"primeicons": "^4.1.0",
"primeng": "^8.0.0",
"quill": "^1.3.7",
"rxjs": "^6.5.5",
"rxjs-compat": "^6.5.5",
"sass": "^1.26.9",
"sweetalert2": "^9.15.2",
"xlsx": "^0.16.9",
"zone.js": "~0.10.3"

}, "devDependencies": { "@angular-devkit/build-angular": "^0.803.28", "@angular/compiler-cli": "^10.2.5", "@angular/language-service": "^10.2.5", "@types/c3": "^0.6.4", "@types/chartist": "^0.9.48", "@types/datatables.net": "^1.10.19", "@types/jasmine": "^2.8.17", "@types/jasminewd2": "^2.0.8", "@types/jquery": "^3.5.0", "@types/lodash": "^4.14.177", "@types/node": "^8.10.61", "codelyzer": "^5.2.2", "install-peers": "^1.0.3", "jasmine-core": "~2.99.1", "jasmine-spec-reporter": "~4.2.1", "karma": "^5.1.0", "karma-chrome-launcher": "~2.2.0", "karma-coverage-istanbul-reporter": "~1.4.2", "karma-jasmine": "~1.1.1", "karma-jasmine-html-reporter": "^0.2.2", "protractor": "^7.0.0", "ts-node": "~5.0.1", "tslint": "~5.9.1", "typescript": "~4.0.8" } }

2
  • Can you mention the Node & npm versions you are using? Commented Mar 12, 2024 at 17:56
  • node -v : 18 , npm :'6.14.17 Commented Mar 13, 2024 at 16:11

1 Answer 1

1

Node v18 is not gonna work. For Angular v10 you need to to run node version ~12 check out the documentation. in my experience you can go max upto v14.x .

Try this, delete node_modules and package-lock.json. Drop down to Node 12.x <= version <= 14.x and then reinstall the dependencies.

Incase you are still getting errors while starting the server, just investigate the other libraries that you're using and update their version compatible to the Node & npm versions you are using.

Sign up to request clarification or add additional context in comments.

2 Comments

i did what you mentioned but my problem is to update mg angular app from version 8 to 13 when i reached v10 i got this error , so i started with node version 10 then update it now to version 18 ad try to upgrade the whole app to 9 ,10. ... till v13
Jumping multiple major versions is a tricky task, along with the necessary code changes you also need to update the other libraries being used. Ideally what we do is to upgrade to a major version and test it out thoroughly before moving to the next one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.