Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Cannot find module '@schematics/angular/utility/config'

Tags:

npm

angular

I'm trying to run the below command to install ngx-bootstrap to my project

ng add ngx-bootstrap

I end up with this error message. See full CLI output below:

i Using package manager: npm
√ Found compatible package version: [email protected].
√ Package information loaded.
√ Package successfully installed.
An unhandled exception occurred: Cannot find module '@schematics/angular/utility/config'
Require stack:
- C:\Users\user\source\repos\DatingApp\client\node_modules\ngx-bootstrap\schematics\ng-add\index.js
- C:\Users\user\source\repos\DatingApp\client\node_modules\@angular-devkit\schematics\tools\export-ref.js
- C:\Users\user\source\repos\DatingApp\client\node_modules\@angular-devkit\schematics\tools\index.js
- C:\Users\user\source\repos\DatingApp\client\node_modules\@angular\cli\utilities\json-schema.js
- C:\Users\user\source\repos\DatingApp\client\node_modules\@angular\cli\models\command-runner.js
- C:\Users\user\source\repos\DatingApp\client\node_modules\@angular\cli\lib\cli\index.js
- C:\Users\user\AppData\Roaming\npm\node_modules\@angular\cli\lib\init.js
- C:\Users\user\AppData\Roaming\npm\node_modules\@angular\cli\bin\ng
See "C:\Users\user\AppData\Local\Temp\ng-qPbtRR\angular-errors.log" for further details.

I tried uninstalling @angular-devkit & @angular/cli and trying again but to no avail.

like image 333
skipper Avatar asked Mar 20 '21 04:03

skipper


Video Answer


2 Answers

I had the same issue, I found the answer that worked for me here: Cannot find module '@schematics/angular/utility/project'

npm uninstall @schematics/angular
npm install @schematics/[email protected]
like image 188
Dan De Kalb Avatar answered Oct 13 '22 16:10

Dan De Kalb


i had similar problem on angular-cli version 11.0.2 when run this command

ng add @nguniversal/express-engine

i update @schematics/angular version is 11.0.1

npm install @schematics/[email protected] 

and worked

like image 44
gizemsever Avatar answered Oct 13 '22 17:10

gizemsever