6

I created an empty blank ionic app (without capacitor), added the cordova plugin and install the google-plus package.

In the devDependecies section of the packages.json I have:

"@angular-devkit/build-angular": "^0.1100.1",
"@angular-devkit/core": "^11.0.1",
"@angular/cli": "~10.0.5",
"@angular/compiler": "~10.0.0",
"@angular/compiler-cli": "~10.0.0",
"@angular/language-service": "~10.0.0",

I proceeded in building the app by doing:

ionic cordova build android --prod --release --verbose

But I get the exception:

An unhandled exception occurred: Cannot find module '@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/utils' Require stack: C:\dev\myapp\node_modules@ionic\angular-toolkit\builders\utils\index.js C:\dev\myapp\node_modules@ionic\angular-toolkit\builders\cordova-build\index.js C:\dev\myapp\node_modules@angular-devkit\architect\node\node-modules-architect-host.js C:\dev\myapp\node_modules@angular-devkit\architect\node\index.js C:\dev\myapp\node_modules@angular\cli\models\architect-command.js C:\dev\myapp\node_modules@angular\cli\commands\run-impl.js C:\dev\myapp\node_modules@angular-devkit\schematics\tools\export-ref.js C:\dev\myapp\node_modules@angular-devkit\schematics\tools\index.js C:\dev\myapp\node_modules@angular\cli\utilities\json-schema.js C:\dev\myapp\node_modules@angular\cli\models\command-runner.js C:\dev\myapp\node_modules@angular\cli\lib\cli\index.js C:\dev\myapp\node_modules@angular\cli\lib\init.js C:\dev\myapp\node_modules@angular\cli\bin\ng See "C:\Users\xyz\AppData\Local\Temp\ng-EHBnHs\angular-errors.log" for further details. [ERROR] An error occurred while running subprocess ng.

I've tried various SO answers like cleaning the cache, updating, re-installing, etc... but I still get this error:

Here the ionic info: enter image description here

Any way to get this error fixed?

5
  • Does this answer your question? Could not find module "@angular-devkit/build-angular" Commented Nov 17, 2020 at 8:56
  • @MansourAlnasser I tried most of the answers suggested there. Nothing worked. Commented Nov 17, 2020 at 8:58
  • check the folder node_modules can you find a @angular-devkit/build-angular ? Commented Nov 17, 2020 at 9:23
  • also share ionic info Commented Nov 17, 2020 at 9:25
  • @MansourAlnasser Yes @angular-devkit/build-angular is there but there is no angular-cli-files folder under src. Commented Nov 17, 2020 at 9:28

3 Answers 3

10

Change devDependencies to "@angular-devkit/build-angular": "~0.1000.0", remove folder node_module folder and run npm i.

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

Comments

1

I had the same issue after changing system, It can happen while migrating from one version to another.

  1. npm i @ionic/angular-toolkit@latest .

Try this it may work for you as well.

Comments

0

had the same problem what fix it

1- npm uninstall -g @ionic/cli

2- npm install -g @ionic/[email protected]

3- make a new project in a new folder

4- ionic start

Note: Don't run "npm audit fix"

5- ionic Cordova build android I hope it works with all

2 Comments

I did run npm audit fix. Do I really need to uninstall the newer version of the ionic/cli and install the 6.8.0 version?
that is what I made try to make a new project with a new version without run npm audit fix if it doesn't work try 6.8.0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.