npm modules, bootstrap and css
See original GitHub issueTrying to use npm modules to install bootstrap
I am getting errors when using bootstrap stylesheets from npm
Environment
- Brunch: 2.9.1
- Node: 7.0.0
- NPM: 3.10.8
- Operating system: ubuntu
package.json
contents
"devDependencies": {
"angularjs-templates-brunch": "^1.0.0",
"assetsmanager-brunch": "^1.8.1",
"auto-reload-brunch": "https://github.com/brunch/auto-reload-brunch.git",
"babel-brunch": "^6.0.6",
"babel-plugin-transform-async-to-generator": "^6.8.0",
"brunch": "^2.0.0",
"chai": "^3.5.0",
"chai-as-promised": "^6.0.0",
"clean-css-brunch": "^2.0.0",
"css-brunch": "^2.6.1",
"eslint": "^2.13.1",
"eslint-config-loopback": "^4.0.0",
"inject-this-brunch": "^4.0.0",
"javascript-brunch": "^2.0.0",
"mocha": "^3.1.2",
"nsp": "^2.1.0",
"postcss-brunch": "^2.0.5",
"sass-brunch": "^2.6.3",
"uglify-js-brunch": "^2.0.0"
},
my npm
section in brunch-config.js is
npm: {
enabled: true,
globals: {
$: 'jquery'
},
styles: {
bootstrap: ['dist/css/bootstrap.css']
}
},
if I exclude the bootstrap key above, bootstrap.css does not get included in vendor.css
when I run npm start
, I get loads of errors similar to this
13 Nov 16:57:38 - error: Source map generation failed for node_modules/bootstrap/dist/css/less/carousel.less: ENOENT: no such file or directory, open '/home/ubuntu/workspace/node_modules/bootstrap/dist/css/less/carousel.less'
which is very odd, as there is no less
directory in node_modules/bootstrap/dist/css
However, despite the errors, the bootstrap.css is included in the vendor.css file
What am I missing / misconfigured ?
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
bootstrap-css - npm
A css module compatible version of bootstrap. ... Start using bootstrap-css in your project by running `npm i bootstrap-css`.
Read more >Webpack - Bootstrap
Learn how to include Bootstrap in your project using Webpack 3. Installing Bootstrap. Install bootstrap as a Node.js module using npm. Importing JavaScript....
Read more >Download · Bootstrap v5.0
Download Bootstrap to get the compiled CSS and JavaScript, source code, or include it with your favorite package managers like npm, RubyGems, and...
Read more >Getting started - Bootstrap
Bootstrap uses Autoprefixer to deal with CSS vendor prefixes. ... install node.js (which includes npm). npm stands for node packaged modules and is...
Read more >Webpack and bundlers · Bootstrap v5.0
Install bootstrap as a Node.js module using npm. ... { // translates CSS into CommonJS modules loader: 'css-loader' }, { // Run postcss...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
worked for me too. thanks a brunch 😉
@jmls try adding this to your brunch-config. This option tells postcss to ignore previously generated source maps. Fixed the issue for me.
plugins: { postcss: { map: {prev: false} } }