Coder Social home page Coder Social logo

Comments (7)

AprilArcus avatar AprilArcus commented on May 10, 2024 17

Can't the problem be solved without updating the version?

You can pin bootstrap-sass to version 3.4.1 by changing the line

        "bootstrap-sass": "^3.3.5",

to

        "bootstrap-sass": "3.4.1",

In your package.json. Note the removal of the leading ^ character.

If you want to use version 3.4.3, you must remove "node-sass", update your "sass" pin to (at least) 1.33, and update your "sass-loader" pin to at least 7.1.0 and preferably to 9.x or greater.

Note that according to your package.json, your version of NodeJS is 8.11.3. As such, the most recent version of sass-loader that will work with your version of NodeJS is 8.0.2, due to webpack-contrib/sass-loader#828

Also note that according to your package.json, your version of Webpack is 4.x. As such, the most recent version of sass-loader that will work with your version of Webpack is 10.2.0, due to webpack-contrib/sass-loader#912

If you choose sass-loader 7.1.0 or 8.x, you will additionally need to configure it to use dart-sass by passing the implementation option to the loader in your webpack config. From sass-loader 9.x onward, dart-sass is default and does not need to be configured.

See

from bootstrap-sass.

snemkaramanoglu avatar snemkaramanoglu commented on May 10, 2024

is there any solution about this issue? When my version was 3.4.1, I was getting this error. I updated the version 3.4.3 and I continue to get the same error.

SassError: Invalid CSS after "... floor(math": expected expression (e.g. 1px, bold), was ".div($grid-gutter-w"
on line 369 of node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_variables.scss

vbar-padding-horizontal: floor(math.div($grid-gutter-width, 2)) !defa
@AprilArcus

from bootstrap-sass.

AprilArcus avatar AprilArcus commented on May 10, 2024

it looks like you might be using an older version of sass. Can you share more of your error?

from bootstrap-sass.

snemkaramanoglu avatar snemkaramanoglu commented on May 10, 2024

I think so. I am sharing the log details. @AprilArcus

ModuleBuildError: Module build failed .../node_modules/sass-loader/dist/cjs.js):
SassError: Invalid CSS after "... floor(math": expected expression (e.g. 1px, bold), was ".div($grid-gutter-w"
on line 369 of node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_variables.scss

    from line 20 of ...\src\styles.scss

vbar-padding-horizontal: floor(math.div($grid-gutter-width, 2)) !defa
------------------------------------------^

at...node_modules\webpack\lib\NormalModule.js:316:20
at ...\node_modules\loader-runner\lib\LoaderRunner.js:367:11
at ...\node_modules\loader-runner\lib\LoaderRunner.js:233:18
at ...\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
at ...\node_modules\sass-loader\dist\index.js:73:7)
at ...\node_modules\neo-async\async.js:8069:18)
at options.error (...\node-sass\lib\index.js:294:32)

from bootstrap-sass.

AprilArcus avatar AprilArcus commented on May 10, 2024

Yes, you're using node-sass, where you need to be using dart-sass for this and future versions. Can you please share the version of sass-loader you're using, and the part of your webpack config where you set up sass-loader?

from bootstrap-sass.

snemkaramanoglu avatar snemkaramanoglu commented on May 10, 2024

I am sharing ;

"7.1.0": {
    "name": "sass-loader",
    "description": "Sass loader for webpack",
    "version": "7.1.0",
    "author": {
        "name": "J. Tangelder"
    },
    "homepage": "https://github.com/webpack-contrib/sass-loader",
    "repository": {
        "type": "git",
        "url": "git+https://github.com/webpack-contrib/sass-loader.git"
    },
    "bugs": {
        "url": "https://github.com/webpack-contrib/sass-loader/issues"
    },
    "engines": {
        "node": ">= 6.9.0 || >= 8.9.0"
    },
    "main": "lib/loader.js",
    "dependencies": {
        "clone-deep": "^2.0.1",
        "loader-utils": "^1.0.1",
        "lodash.tail": "^4.1.1",
        "neo-async": "^2.5.0",
        "pify": "^3.0.0",
        "semver": "^5.5.0"
    },
    "devDependencies": {
        "bootstrap-sass": "^3.3.5",
        "css-loader": "^0.28.4",
        "eslint": "^3.16.0",
        "eslint-config-peerigon": "^9.0.0",
        "eslint-plugin-jsdoc": "^2.4.0",
        "file-loader": "^0.11.2",
        "mocha": "^3.0.2",
        "mock-require": "^3.0.1",
        "node-sass": "^4.5.0",
        "nyc": "^11.0.2",
        "raw-loader": "^0.5.1",
        "sass": "^1.3.0",
        "should": "^11.2.0",
        "standard-version": "^4.2.0",
        "style-loader": "^0.18.2",
        "webpack": "^4.5.0",
        "webpack-dev-server": "^2.4.1",
        "webpack-merge": "^4.0.0"
    },
    "peerDependencies": {
        "webpack": "^3.0.0 || ^4.0.0"
    },
    "keywords": [

        "maintainers": [
            ...
        ],
        "directories": {},
        ...
        "_npmVersion": "5.6.0",
        "_id": "[email protected]",
        "dist": {},

        "_nodeVersion": `"8.11.3"`

Can't the problem be solved without updating the version? Normally, we were not getting any errors while our application was being built 1 month ago. @AprilArcus

from bootstrap-sass.

snemkaramanoglu avatar snemkaramanoglu commented on May 10, 2024

Thank you so much for detail explanations.@AprilArcus

from bootstrap-sass.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.