I'm trying to use bootstrap 4 with my angular installation. i've run npm install --save bootstrap@next but i have a break at runtime :
./node_modules/css-loader?{"sourceMap":false,"importLoaders":1}!./node_modules/postcss-loader/lib?{"ident":"postcss","plugins":[null,null,null],"sourceMap":false}!./node_modules/bootstrap/dist/css/bootstrap.min.css
Module build failed: BrowserslistError: Unknown browser major
at error (C:\xampp\htdocs\tick_master_angular\web\node_modules\browserslist\index.js:37:11)
at Function.browserslist.checkName (C:\xampp\htdocs\tick_master_angular\web\node_modules\browserslist\index.js:320:18)
at Function.select (C:\xampp\htdocs\tick_master_angular\web\node_modules\browserslist\index.js:438:37)
at C:\xampp\htdocs\tick_master_angular\web\node_modules\browserslist\index.js:207:41
at Array.forEach (native)
at browserslist (C:\xampp\htdocs\tick_master_angular\web\node_modules\browserslist\index.js:196:13)
at Browsers.parse (C:\xampp\htdocs\tick_master_angular\web\node_modules\autoprefixer\lib\browsers.js:44:14)
at new Browsers (C:\xampp\htdocs\tick_master_angular\web\node_modules\autoprefixer\lib\browsers.js:39:28)
at loadPrefixes (C:\xampp\htdocs\tick_master_angular\web\node_modules\autoprefixer\lib\autoprefixer.js:56:18)
at plugin (C:\xampp\htdocs\tick_master_angular\web\node_modules\autoprefixer\lib\autoprefixer.js:62:18)
at LazyResult.run (C:\xampp\htdocs\tick_master_angular\web\node_modules\postcss-loader\node_modules\postcss\lib\lazy-result.js:270:20)
at LazyResult.asyncTick (C:\xampp\htdocs\tick_master_angular\web\node_modules\postcss-loader\node_modules\postcss\lib\lazy-result.js:185:32)
at LazyResult.asyncTick (C:\xampp\htdocs\tick_master_angular\web\node_modules\postcss-loader\node_modules\postcss\lib\lazy-result.js:197:22)
at processing.Promise.then._this2.processed (C:\xampp\htdocs\tick_master_angular\web\node_modules\postcss-loader\node_modules\postcss\lib\lazy-result.js:224:20)
at LazyResult.async (C:\xampp\htdocs\tick_master_angular\web\node_modules\postcss-loader\node_modules\postcss\lib\lazy-result.js:221:27)
at LazyResult.then (C:\xampp\htdocs\tick_master_angular\web\node_modules\postcss-loader\node_modules\postcss\lib\lazy-result.js:127:21)
@ ./node_modules/css-loader?{"sourceMap":false,"importLoaders":1}!./node_modules/postcss-loader/lib?{"ident":"postcss","sourceMap":false}!./src/styles.css 3:10-190
@ ./src/styles.css
@ multi ./src/styles.css
Can someone help please?
The issue could be that you got the latest build with some bug. I noticed that [email protected] is causing this issue, but not [email protected]. Check if yours is the same. Try uninstalling that and run something with a specific version.
npm install [email protected]
This resolved my problem.
Bootstrap new version come which is v4.0.0-beta.2 and your package.json has ^bootstrap4.0.0-alpha.6 so new bootstrap version wants browsers list dependency.
To run your app remove lastest version tag (^) & run npm install command
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With