I'm a beginner, trying to make an app using Ionic-Cordova. When I type "ionic cordova build android", I get this error:
[error] Error: Cannot find module '@angular-devkit/build-angular/src/angular-cli-
files/models/webpack-configs/utils'
Require stack:
C:UsersHphavadurumu
[email protected]
C:UsersHphavadurumu
[email protected]
C:UsersHphavadurumu
ode_modules@angular-devkitarchitect
ode
ode-modules-architect-host.js
C:UsersHphavadurumu
ode_modules@angular-devkitarchitect
odeindex.js
C:UsersHphavadurumu
[email protected]
C:UsersHphavadurumu
ode_modules@angularclicommands
un-impl.js
C:UsersHphavadurumu
[email protected]
C:UsersHphavadurumu
[email protected]
C:UsersHphavadurumu
[email protected]
C:UsersHphavadurumu
[email protected]
C:UsersHphavadurumu
[email protected]
C:UsersHphavadurumu
[email protected]
C:UsersHphavadurumu
ode_modules@angularcliin
g
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (C:UsersHphavadurumu
ode_modules@ionicangular-
toolkituildersutilsindex.js:3:17)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Module.require (internal/modules/cjs/loader.js:952:19)*
I read that the error might be related to the missing node_modules folder, but it's not missing in my project. I've also tried to uninstall-reinstall the Npm, it didn't work either.
Thanks in advance.
EDIT Here is my package.json file:
"private": true,
"dependencies": {
"@angular/common": "~10.0.0",
"@angular/core": "~10.0.0",
"@angular/forms": "~10.0.0",
"@angular/platform-browser": "~10.0.0",
"@angular/platform-browser-dynamic": "~10.0.0",
"@angular/router": "~10.0.0",
"@ionic-native/core": "^5.0.0",
"@ionic-native/splash-screen": "^5.0.0",
"@ionic-native/status-bar": "^5.0.0",
"@ionic/angular": "^5.0.0",
"rxjs": "~6.5.5",
"tslib": "^2.0.0",
"zone.js": "~0.10.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.1101.0",
"@angular/cli": "~10.0.5",
"@angular/compiler": "~10.0.0",
"@angular/compiler-cli": "~10.0.0",
"@angular/language-service": "~10.0.0",
"@ionic/angular-toolkit": "^2.3.0",
"@ionic/lab": "3.2.10",
"@types/jasmine": "~3.5.0",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^12.11.1",
"codelyzer": "^6.0.0",
"cordova-android": "^9.0.0",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-ionic-keyboard": "^2.2.0",
"cordova-plugin-ionic-webview": "^4.2.1",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~5.0.0",
"karma": "~5.0.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
"karma-jasmine": "~3.3.0",
"karma-jasmine-html-reporter": "^1.5.0",
"protractor": "~7.0.0",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "~3.9.5"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-whitelist": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
},
"cordova-plugin-ionic-keyboard": {}
},
"platforms": [
"android"
question from:
https://stackoverflow.com/questions/65835238/an-unhandled-exception-occurred-cannot-find-module-angular-devkit