I tried to install react-bootstrap and followed these instructions:
https://react-bootstrap.github.io/getting-started/introduction
However after starting the app (simulated device via Android Studio) I receive this error:
error: bundling failed: Error: Unable to resolve module `bootstrap/dist/css/bootstrap.min.css` from `index.js`: bootstrap/dist/css/bootstrap.min.css could not be found within the project.
My dependencies are as follows:
"dependencies": {
"bootstrap": "^4.4.1",
"react": "16.9.0",
"react-bootstrap": "^1.0.0-beta.16",
"react-native": "0.61.5"
And both modules are within node_modules and so is the file bootstrap.min.css.
I tried things like
import 'bootstrap/dist/css/bootstrap.min.css';
import './node_modules/bootstrap/dist/css/bootstrap.min.css';
import '../node_modules/bootstrap/dist/css/bootstrap.min.css'; (should be wrong anyways);
(in index.js and also App.js like mentioned in the instructions)
I also read here:
https://github.com/reactstrap/reactstrap/issues/1325
and here:
Can't resolve '../node_modules/bootstrap/dist/css/bootstrap.min.css'?
but I have the import like in the given answer.
I tried an older version of react-bootstrap and bootstrap and I deleted all node_modules and resinstalled them even though the "missing" file is there.
My project is basically a vanilla react-native project.
I just started with npx react-native init name and tried to add bootstrap, so nothing has changed.
What is the issue here?