skipper
skipper

Reputation: 461

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

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.

Upvotes: 11

Views: 10247

Answers (3)

gizemsever
gizemsever

Reputation: 378

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

Upvotes: 1

Dan De Kalb
Dan De Kalb

Reputation: 236

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]

Upvotes: 22

Hrishikesh Kale
Hrishikesh Kale

Reputation: 6548

Because ngx-bootstrap require angular schematics module, for that, you need to install angular @schematics

you can install using

npm i @schematics/angular

Upvotes: 0

Related Questions