I want to add bootstrap 4 to our webpack configuration instead of bootstrap 3. However I'm having trouble trying to get bootstrap-loader to find bootstrap 4. Bootstrap-loader seems to not be able to find an installed bootstrap node module? Do I have an incorrect version of one of the node modules?
The error is:
ERROR in ./~/bootstrap-loader/lib/bootstrap.loader.js!./~/bootstrap- loader/no-op.js
Module build failed: Error:
Could not find bootstrap version: '3'. Did you install it?
The package is 'bootstrap' for bootstrap v4 and 'bootstrap-sass' for v3.
at Object.module.exports.pitch (/Users/menuka/Development/devExperiments/node_modules/bootstrap-loader/lib/bootstrap.loader.js:141:11)
@ ./~/bootstrap-loader/loader.js 1:17-61
My package.json dependencies are:
"dependencies": {
"babel-polyfill": "^6.16.0",
"body-parser": "^1.15.2",
"bootstrap": "4.0.0-alpha.4",
"bootstrap-loader": "2.0.0-beta.16",
"config": "^1.24.0",
"css-loader": "^0.25.0",
"exports-loader": "^0.6.3",
"express": "^4.14.0",
"extract-text-webpack-plugin": "^2.0.0-beta.4",
"file-loader": "^0.9.0",
"imports-loader": "^0.6.5",
"jquery": "^3.1.1",
"js-yaml": "^3.7.0",
"json-loader": "^0.5.4",
"less": "^2.7.1",
"less-loader": "^2.2.3",
"lodash": "^4.17.2",
"node-sass": "^3.11.2",
"postcss-loader": "^1.1.0",
"pug": "^2.0.0-beta6",
"qs": "^6.3.0",
"querystring": "^0.2.0",
"rc-progress": "^2.0.3",
"react": "^15.4.1",
"react-bootstrap": "^0.30.6",
"react-dom": "^15.4.1",
"react-redux": "^4.4.6",
"react-router": "^3.0.0",
"react-router-redux": "^4.0.7",
"react-steps": "0.0.4",
"redux": "^3.6.0",
"resolve-url-loader": "^1.6.0",
"sass-loader": "^4.0.2",
"style-loader": "^0.13.1",
"url-loader": "^0.5.7",
"webpack": "^2.1.0-beta.27"
},
And yeah, I do know that react-bootstrap is not compatible with bootstrap 4. I haven't had a chance to modify existing code yet. Would that be an issue with my bootstrap-loader problem?
Needed to add a config file for bootstrap-loader. It's now pretty clear within the documentation for bootstrap-loader.