SMART icon indicating copy to clipboard operation
SMART copied to clipboard

WebpackError at /accounts/login/

Open gundarskorats opened this issue 3 years ago • 2 comments

OS: Ubuntu 20.04 Problem: Followed installation instructions successfully (no errors during building process), but encountered with WebpackError at /accounts/login/. Any suggestions how to solve this?

WebpackError at /accounts/login/

            ModuleBuildError in 
            Module build failed (from ../node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ../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 8 of node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss
        from line 2 of src/styles/_base.scss
        from line 5 of src/styles/_includes.scss
        from line 2 of src/styles/smart.scss
>> vbar-padding-horizontal:        floor(math.div($grid-gutter-width, 2)) !defa
   ------------------------------------------^
at processResult (/code/node_modules/webpack/lib/NormalModule.js:753:19)
at /code/node_modules/webpack/lib/NormalModule.js:855:5
at /code/node_modules/loader-runner/lib/LoaderRunner.js:399:11
at /code/node_modules/loader-runner/lib/LoaderRunner.js:251:18
at context.callback (/code/node_modules/loader-runner/lib/LoaderRunner.js:124:13)
at Object.callback (/code/node_modules/sass-loader/dist/index.js:54:7)
at Object.done [as callback] (/code/node_modules/neo-async/async.js:8069:18)
at options.error (/code/node_modules/node-sass/lib/index.js:293:32)
        </pre>
Request Method: GET
http://localhost:8000/accounts/login/?next=/projects/
3.2.9
WebpackError
ModuleBuildError in Module build failed (from ../node_modules/mini-css-extract-plugin/dist/loader.js): ModuleBuildError: Module build failed (from ../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 8 of node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss from line 2 of src/styles/_base.scss from line 5 of src/styles/_includes.scss from line 2 of src/styles/smart.scss >> vbar-padding-horizontal: floor(math.div($grid-gutter-width, 2)) !defa ------------------------------------------^ at processResult (/code/node_modules/webpack/lib/NormalModule.js:753:19) at /code/node_modules/webpack/lib/NormalModule.js:855:5 at /code/node_modules/loader-runner/lib/LoaderRunner.js:399:11 at /code/node_modules/loader-runner/lib/LoaderRunner.js:251:18 at context.callback (/code/node_modules/loader-runner/lib/LoaderRunner.js:124:13) at Object.callback (/code/node_modules/sass-loader/dist/index.js:54:7) at Object.done [as callback] (/code/node_modules/neo-async/async.js:8069:18) at options.error (/code/node_modules/node-sass/lib/index.js:293:32)
/usr/local/lib/python3.8/site-packages/webpack_loader/loader.py, line 117, in get_bundle
/usr/local/bin/python
3.8.12
['/code', '/code', '/usr/local/lib/python38.zip', '/usr/local/lib/python3.8', '/usr/local/lib/python3.8/lib-dynload', '/usr/local/lib/python3.8/site-packages']
Tue, 08 Mar 2022 06:44:18 +0000

Error during template rendering In template /code/smart/templates/base.html, error at line 20

ModuleBuildError in Module build failed (from ../node_modules/mini-css-extract-plugin/dist/loader.js): ModuleBuildError: Module build failed (from ../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 8 of node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss from line 2 of src/styles/_base.scss from line 5 of src/styles/_includes.scss from line 2 of src/styles/smart.scss >> vbar-padding-horizontal: floor(math.div($grid-gutter-width, 2)) !defa ------------------------------------------^ at processResult (/code/node_modules/webpack/lib/NormalModule.js:753:19) at /code/node_modules/webpack/lib/NormalModule.js:855:5 at /code/node_modules/loader-runner/lib/LoaderRunner.js:399:11 at /code/node_modules/loader-runner/lib/LoaderRunner.js:251:18 at context.callback (/code/node_modules/loader-runner/lib/LoaderRunner.js:124:13) at Object.callback (/code/node_modules/sass-loader/dist/index.js:54:7) at Object.done [as callback] (/code/node_modules/neo-async/async.js:8069:18) at options.error (/code/node_modules/node-sass/lib/index.js:293:32)

gundarskorats avatar Mar 08 '22 07:03 gundarskorats

Hi @gundarskorats ! This appears to be a new error in master which is occurring for us as well. I'm not seeing it in our dev branches so I'm going to look at what's different.

AstridKery avatar Mar 08 '22 15:03 AstridKery

Ok a fix has been merged into master. Turns out the yarn.lock file was not updated when the package.json file was. Please pull the changes and rebuild. You may need to use the flag --no-cache when running docker-compose build.

AstridKery avatar Mar 09 '22 15:03 AstridKery