Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update packagist for 3.4.3 #1228

Open
Eseperio opened this issue Mar 2, 2022 · 7 comments
Open

Update packagist for 3.4.3 #1228

Eseperio opened this issue Mar 2, 2022 · 7 comments

Comments

@Eseperio
Copy link

Eseperio commented Mar 2, 2022

Last stable release available in Packagist is 3.4.2, which contains a bug using Math.div in a wrong place and this prevents compiling any project. 3.4.1 uses older math methods and keeps flooding the console with Sass warnings

@snemkaramanoglu
Copy link

snemkaramanoglu commented Mar 14, 2022

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

@AprilArcus
Copy link
Contributor

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

@snemkaramanoglu
Copy link

snemkaramanoglu commented Mar 14, 2022

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)

@AprilArcus
Copy link
Contributor

AprilArcus commented Mar 14, 2022

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?

@snemkaramanoglu
Copy link

snemkaramanoglu commented Mar 14, 2022

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": "sass-loader@7.1.0",
        "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

@AprilArcus
Copy link
Contributor

AprilArcus commented Mar 16, 2022

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

@snemkaramanoglu
Copy link

snemkaramanoglu commented Mar 17, 2022

Thank you so much for detail explanations.@AprilArcus

lcharette added a commit to userfrosting/theme-adminlte that referenced this issue May 2, 2022
roelarents added a commit to PDOK/nlmaps that referenced this issue Jun 28, 2022
cbeyer42 added a commit to cloudogu/ces-theme that referenced this issue Oct 20, 2023
ppxl added a commit to cloudogu/ces-theme that referenced this issue Oct 20, 2023
Move vulnerable depenceny sharp to dev depencies #39

 # Changed
- Move `sharp` to dev dependencies (#39)
- Pin `bootstrap-sass` to `3.4.1` because of build issues
   - twbs/bootstrap-sass#1228 (comment)
lucydodo added a commit to lucydodo/website that referenced this issue Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants