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.

Problem with building non-current versions of MDC Web

See original GitHub issue

I’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:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
deap82commented, Aug 22, 2017

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:

2017-08-22T06:31:11.8032548Z Error in plugin 'sass'
2017-08-22T06:31:11.8032548Z Message:
2017-08-22T06:31:11.8032548Z     node_modules\@material\theme\_mixins.scss
2017-08-22T06:31:11.8032548Z Error: Invalid style specified! Choose one of primary, accent, background, text-primary-on-primary, text-secondary-on-primary, text-hint-on-primary, text-disabled-on-primary, text-icon-on-primary, text-primary-on-accent, text-secondary-on-accent, text-hint-on-accent, text-disabled-on-accent, text-icon-on-accent, text-primary-on-background, text-secondary-on-background, text-hint-on-background, text-disabled-on-background, text-icon-on-background, text-primary-on-light, text-secondary-on-light, text-hint-on-light, text-disabled-on-light, text-icon-on-light, text-primary-on-dark, text-secondary-on-dark, text-hint-on-dark, text-disabled-on-dark, text-icon-on-dark
2017-08-22T06:31:11.8032548Z         on line 26 of node_modules/@material/theme/_mixins.scss
2017-08-22T06:31:11.8032548Z >>     @error "Invalid style specified! Choose one of #{map-keys($mdc-theme-prope
2017-08-22T06:31:11.8032548Z    -----------^

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.

1reaction
deap82commented, Oct 7, 2017

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught Error: (mdc-auto-init) Could not find constructor in ...
I am able to successfully auto initialize if I use the CDN version of material web components, but then I don't gain any...
Read more >
ACCOUNTING MANUAL FOR FLORIDA's COLLEGE SYSTEM
Those sections that have been updated in the Manual are noted with a revision date of 06/2014. The current version of the Manual....
Read more >
MDC Partners - AnnualReports.com
MDC's strategy is to build, grow and acquire market-leading businesses that deliver innovative, value-added marketing, activation, communications and ...
Read more >
Java. This vulnerability - CVE - Search Results
In Apache Cayenne 4.1 and earlier, running on non-current patch versions of ... full stack Java framework designed for building JVM web applications...
Read more >
Gerrit 3.4.0 release
Support for JCraft JSch will be removed in the next gerrit release. ... Issue 12983; Allow users to specify default branch when creating...
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