Problem with building non-current versions of MDC Web
See original GitHub issueI’m still on version 0.11.1 of the full material-components-web package. After returning from vacation I suddenly have an issue with building the sass in our build environment. The build environment runs the exact same scripts as on local dev, using gulp. The sass is built with npm package “gulp-sass”.
The issue seems to be related to an update made on July 14 2017, where a bunch of sass variables were renamed; https://github.com/material-components/material-components-web/commit/df4ccf94f0d22c6f76dce58024f447b5baea3503
When the build server runs the gulp script, gulp-sass outputs the following error message:
2017-08-07T14:50:58.9621763Z Error in plugin 'sass'
2017-08-07T14:50:58.9621763Z Message:
2017-08-07T14:50:58.9621763Z node_modules\@material\elevation\_variables.scss
2017-08-07T14:50:58.9621763Z Error: Undefined variable: "$mdc-animation-standard-curve-timing-function".
2017-08-07T14:50:58.9621763Z on line 122 of node_modules/@material/elevation/_variables.scss
2017-08-07T14:50:58.9621763Z >> mdc-elevation-transition-timing-function: $mdc-animation-standard-curve-timing
2017-08-07T14:50:58.9621763Z ------------------------------------------^
It seems to me that the server (when running npm install) has downloaded a more current version of material/elevation/_variables.scss, while material/animation/_variables.scss is still at the point of 0.11.1.
When I’m running locally, using Task Runner Explorer in VS, everything works as expected and by inspecting my local node_modules folder I have verified that I indeed have the 0.11.1 version of mentioned files, IE before the variable rename commit. This is even after running npm install locally several times.
My dependency in package.json looks like this:
"material-components-web": "^0.11.1"
If anyone has any idea on what might go wrong on the build server it would be greatly appreciated. Has something gone wrong with the versioning of the elevation and/or animation package?
I suppose a solution might be to upgrade, at least to the first version released after July 14, but as a lot has happened, that is a task I’m not keen on rushing into without some planning.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:13 (5 by maintainers)
Top GitHub Comments
Hi @acdvorak, there seems to be a similar issue again, after the 0.18.0 release our build environment gives the following sass compilation error:
It seems as long as I don’t do an upgrade locally I’m not affected, but the build environment always runs npm install on a new empty folder.
@acdvorak @mikegleasonjr As I understand the issue and the suggestion, for the next release there might be another package I would need to install explicitly. As a workaround I’ll probably set up some gulp task that copies all the mdc files to a folder I’ll commit into source control, and direct my imports to those files. That way the build environment won’t depend on the files installed by npm install.
My current workaround is to do the upgrade, but that is obviously a bit inconvenient.