![]() Your reference to bootstrap within index.js looks fine: import 'bootstrap/dist/css/boostrap.css' With that being said, a lot of bootstrap's features depend on the following libraries: popper.js, and jquery. If you don't see the bootstrap directory please do the following: npm i -S bootstrapĪs this will save bootstrap as dependency for your project. For you I believe the absolute path is the following: C:\Users\test\counter-app\src\node_modules\bootstrap This would be at /node_modules/bootstrap where is your project's root directory location. Can you verify that your bootstrap installation was correct by looking within your node_modules for a bootstrap folder? bootstrap had an issue installing within your node_modules directory, or your reference to the library within your code is incorrect. This occurs either because the installation of a library wasn't successful, i.e. ReactDOM.render(, document.getElementById("root")) Import "bootstrap/dist/css/bootstrap.css" Import * as serviceWorker from "./serviceWorker" Then I imported the same in index.js and while reloading the page (localhost:3000) I got the error msg: Module not found:Ĭan't resolve 'bootstrap/dist/css/bootstrap.css' in 'C:\Users\test\counter-app\src' For that I've installed bootstrap (version 4.1.1) which is successfully installed.
0 Comments
Leave a Reply. |