I'm trying to install ngx-bootstrap on my angular project, but when i execute the command:
ng add ngx-bootstrap
It gives me the following error:
An unhandled exception occurred: Cannot find module '@schematics/angular/utility/config'
Require stack:
- C:\Users\xxx\Documents\app\node_modules\ngx-bootstrap\schematics\ng-add\index.js
- C:\Users\xxx\Documents\app\node_modules\@angular-devkit\schematics\tools\export-ref.js
- C:\Users\xxx\Documents\app\node_modules\@angular-devkit\schematics\tools\index.js
- C:\Users\xxx\Documents\app\node_modules\@angular\cli\utilities\json-schema.js
- C:\Users\xxx\Documents\app\node_modules\@angular\cli\models\command-runner.js
- C:\Users\xxx\Documents\app\node_modules\@angular\cli\lib\cli\index.js
- C:\Users\xxx\AppData\Roaming\npm\node_modules\@angular\cli\lib\init.js
- C:\Users\xxx\AppData\Roaming\npm\node_modules\@angular\cli\bin\ng
See "C:\Users\xxx\AppData\Local\Temp\ng-nIyjnm\angular-errors.log" for further details.
I have tried to install the schematics module, but it keeps giving me the same error.
Does anybody know how I can fix it?
Thanks!
You need to reinstall angular schematics.
Try this -
npm uninstall @schematics/angular
npm cache clean
npm install @schematics/angular@YOUR_ANGULAR_VERSION
then install ngx-bootstrap
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.