Skip to content
This repository was archived by the owner on Mar 20, 2024. It is now read-only.
This repository was archived by the owner on Mar 20, 2024. It is now read-only.

UnhandledPromiseRejectionWarning: Error: no mixin named checkbox-primary #44

Closed

Description

@norkunas

After updating material to 1.1.23, I'm getting this error when building.

(node:23488) UnhandledPromiseRejectionWarning: Error: no mixin named checkbox-primary
    at Object.module.exports.renderSync (/home/norkunas/www/node_modules/node-sass/lib/index.js:441:16)
    at Function.CSSBuilder._compileSCSS (/home/norkunas/www/node_modules/angular-material-tools/lib/builders/CSSBuilder.js:49:29)
    at MaterialTools.MaterialBuilder._buildTheme (/home/norkunas/www/node_modules/angular-material-tools/lib/builders/MaterialBuilder.js:71:48)
    at /home/norkunas/www/gulp/styles.js:39:28

Activity

  1. self-assigned this
    on Jun 22, 2020
  2. Splaktar commented on Jun 22, 2020

    @Splaktar
    Contributor

    Can you provide any reproduction steps? I'm seeing npm run test:versions pass in current master and with PR #45.

  3. norkunas commented on Jun 23, 2020

    @norkunas
    Author

    package.json:

    {
      "dependencies": {
        "angular": "^1.8.0",
        "angular-material": "^1.1.23",
        "angular-material-tools": "^1.0.0-beta.9",
        "gulp": "^3.9.1"
      }
    }
    

    gulpfile.js:

    const gulp = require('gulp');
    const MaterialTools = require('angular-material-tools');
    const builder = new MaterialTools({
      destination: 'build',
      version: 'local',
      themes: []
    });
    
    gulp.task('styles', [], function (done) {
      builder._getData().then(function (buildData) {
        builder._buildTheme(buildData);
        done();
      });
    });
    

    For some reason it's enough to pass the empty themes key to the builder and then it fails/without it succeeds..

  4. norkunas commented on Aug 4, 2020

    @norkunas
    Author

    Will this be fixed? :)

  5. added this to the 1.0.0 milestone on Aug 7, 2020
  6. Splaktar commented on Aug 7, 2020

    @Splaktar
    Contributor

    Yes, we plan to fix this, but we've been heads down on getting the 1.2.0 release out. Now that that is done, this issue can get some attention.

  7. added a commit that references this issue on Oct 29, 2020
  8. Splaktar commented on Oct 29, 2020

    @Splaktar
    Contributor

    OK, it looks like the 1.0.0-beta.9 release was bad. It included the whole repo w/o the dist/ folder and didn't publish the built files in dist/ as it should have.

    The workaround for now is to use "angular-material-tools": "1.0.0-beta.8",

    I'll try to get this resolved and put out another release soon.

  9. Splaktar commented on Oct 29, 2020

    @Splaktar
    Contributor

    It looks like the change of mixins.scss to _mixins.scss in 1.1.23 caused this exception.

    I made this repo to help debug this.

    I fixed this exception in dc8e6be, but that just led to another exception:

    (node:10260) UnhandledPromiseRejectionWarning: TypeError: Reduce of empty array with no initial value
        at Array.reduce (<anonymous>)
        at ThemeBuilder.build (/Users/splaktar/Git/devintent/material-tools-test/node_modules/angular-material-tools/lib/builders/ThemeBuilder.js:40:14)
        at MaterialTools.MaterialBuilder._buildTheme (/Users/splaktar/Git/devintent/material-tools-test/node_modules/angular-material-tools/lib/builders/MaterialBuilder.js:73:50)
        at /Users/splaktar/Git/devintent/material-tools-test/gulpfile.js:11:13
    (node:10260) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
    (node:10260) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
    

    I'll investigate this next.

  10. Splaktar commented on Oct 30, 2020

    @Splaktar
    Contributor

    @norkunas thank you very much for this report and the reminders to follow up on it!

    I believe that these issues are all addressed. Can you please give 1.0.0-rc.3 a try and let us know how it works for you?

    If it looks good for you, we will release an official 1.0.0.

  11. norkunas commented on Oct 30, 2020

    @norkunas
    Author

    Thank you for fixing it :) I'll check it on tuesday.

  12. norkunas commented on Nov 3, 2020

    @norkunas
    Author

    I confirm it works for us upgrading to material v1.2 :) thank you once more.

  13. Splaktar commented on Nov 3, 2020

    @Splaktar
    Contributor

    @norkunas great! Thank you very much for taking the time to try it out and report back here. Much appreciated ⭐

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions