How can I fix ngx-bootstrap "can't resolve" errors - ngx-bootstrap

I have a new project that I am trying to add ngx-bootstrap to.
if I include below import into any component
import { BsModalRef } from 'ngx-bootstrap';
I get a ton of compile errors as follows...
ERROR in C:/Source/MappingServices/node_modules/ngx-bootstrap/collapse/fesm2015/ngx-bootstrap-collapse.js
Module not found: Error: Can't resolve '#angular/animations' in 'C:\Source\MappingServices\node_modules\ngx-bootstrap\collapse\fesm2015'
ERROR in C:/Source/MappingServices/node_modules/ngx-bootstrap/buttons/fesm2015/ngx-bootstrap-buttons.js
Module not found: Error: Can't resolve '#angular/forms' in 'C:\Source\MappingServices\node_modules\ngx-bootstrap\buttons\fesm2015'
ERROR in C:/Source/MappingServices/node_modules/ngx-bootstrap/datepicker/fesm2015/ngx-bootstrap-datepicker.js
Module not found: Error: Can't resolve '#angular/forms' in 'C:\Source\MappingServices\node_modules\ngx-bootstrap\datepicker\fesm2015'
ERROR in C:/Source/MappingServices/node_modules/ngx-bootstrap/pagination/fesm2015/ngx-bootstrap-pagination.js
Module not found: Error: Can't resolve '#angular/forms' in 'C:\Source\MappingServices\node_modules\ngx-bootstrap\pagination\fesm2015'
ERROR in C:/Source/MappingServices/node_modules/ngx-bootstrap/rating/fesm2015/ngx-bootstrap-rating.js
Module not found: Error: Can't resolve '#angular/forms' in 'C:\Source\MappingServices\node_modules\ngx-bootstrap\rating\fesm2015'
ERROR in C:/Source/MappingServices/node_modules/ngx-bootstrap/sortable/fesm2015/ngx-bootstrap-sortable.js
Module not found: Error: Can't resolve '#angular/forms' in 'C:\Source\MappingServices\node_modules\ngx-bootstrap\sortable\fesm2015'
ERROR in C:/Source/MappingServices/node_modules/ngx-bootstrap/timepicker/fesm2015/ngx-bootstrap-timepicker.js
Module not found: Error: Can't resolve '#angular/forms' in 'C:\Source\MappingServices\node_modules\ngx-bootstrap\timepicker\fesm2015'
ERROR in C:/Source/MappingServices/node_modules/ngx-bootstrap/typeahead/fesm2015/ngx-bootstrap-typeahead.js
Module not found: Error: Can't resolve '#angular/forms' in 'C:\Source\MappingServices\node_modules\ngx-bootstrap\typeahead\fesm2015'
I've search for a solution but there is none that works for me.
Any help is greatly appreciated.

not sure why npm isnt installing dependencies in ur setup
try installing packages which you see in the error
https://www.npmjs.com/package/#angular/forms
#angular/animations

Related

Module not found: Error: Can't resolve 'react-native-web/dist/exports/LogBox' in 'node_modules/react-native-reanimated/lib'

I started getting this error in my react-native project. How can I resolve this?

Why do I get this error: Can't resolve './components/forms/LoginForm'

Why do I get this error after running the npm run dev command:
npm run development
ERROR in ./resources/js/app.js 5:0-53
Module not found: Error: Can't resolve './components/forms/LoginForm' in 'D:\wamp64\www\my-website\my-website\resources\js'
Try registering the component like this
'./components/forms/LoginForm.vue'

error: bundling failed: Error: Unable to resolve module react-native-gesture-handler

I keep getting the error when using react-navigation. I have tried clearing the cache and reinstalling the node modules but it still does not work.

Uncaught Error: Cannot find module 'zlib' while it is included

I have included "zlib": "^1.0.5" in the package.json under dependencies. And did npm install. But still having the same console error. Any idea of what might it be wrong?
The console error I'm getting:
Uncaught Error: Cannot find module 'zlib' from 'mathml/app/MathML/MathMLRenderer.js'

Failed to compile create-react-app.Cannot find module "ReactPropTypesSecret"

Every time i try to 'npm start' my create-react-app project ,it throws this error saying
./src/index.js
Error: Cannot find module './lib/ReactPropTypesSecret'
Referenced from:
And I couldn't really find out what's causing this error.