question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bootstrap's sass is not working with new r2.0.0-next.66cc7a90 (with opt-in sass)

See original GitHub issue

Is this a bug report?

Doubt it, but it might be interesting to know, due to the fact that bootstrap is recommended in the README, and bootstrap itself recommends using sass for its full potential

Relates to #3815

Environment

  1. node -v: 8.9.1
  2. yarn --version (if you use Yarn): 1.6.0
  3. npm ls react-scripts (if you haven’t ejected): r2.0.0-next.66cc7a90
  4. Operating system: debian sid amd64

Steps to Reproduce

  1. npx create-react-app myapp --scripts-version react-scripts@2.0.0-next.66cc7a90
  2. rename index.css to index.scss
  3. update index.js to point to index.scss
  4. yarn add bootstrap
  5. open index.scss and add at the bottom @import "~bootstrap/scss/bootstrap.scss";
  6. yarn && yarn start

Expected Behavior

No error is shown.

Actual Behavior

This error appears:

./src/index.scss
Module build failed: 
module.exports = require('./lib/node-progress');
^
      Invalid CSS after "m": expected 1 selector or at-rule, was "module.exports = re"
      in bla/bla/bla/node_modules/progress/index.js (line 1, column 1)

More info

According to bootstrap:

For Bootstrap to compile, make sure you install and use the required loaders: sass-loader, postcss-loader with Autoprefixer

I think those loaders are missing, does anyone know if there’s an easy way to add them without ejecting?

I hope to be helpful,

Thanks to everyone!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
hermanhocommented, Jun 8, 2018

Could the fixed alpha version be deployed to npm?

2reactions
iansucommented, Apr 28, 2018

I merged the PR updating sass-loader to 7.0.1 but I’ll leave this issue open for the time being.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sass · Bootstrap v5.0
Utilize our source Sass files to take advantage of variables, maps, mixins, and functions to help you build faster and customize your project....
Read more >
next.js - How do I implement the Sass features of Bootstrap 5 ...
I am working on a NextJS project, and I already have experience using Sass with NextJS. Now I am trying to build a...
Read more >
React Bootstrap using Sass with custom theming
Activating extension 'vscode.typescript-language-features' failed: Could not find bundled tsserver.js.
Read more >
Introduction - React-Bootstrap
If you plan on customizing the Bootstrap Sass files, or don't want to use a CDN for the stylesheet, it may be helpful...
Read more >
Chapter 7 Tidy your CSS with Sass
One of the main problem with CSS is to handle the growing number of files and the code repetition. Nowadays, web developers mainly...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found