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.

Error building a custom theme

See original GitHub issue

Bug, feature request, or proposal:

Building a custom theme with angular-cli fails.

What is the expected behavior?

Custom theme built from the scss file made with the theming guide steps.

What is the current behavior?

The building process fails when it tries to build the theme.

What are the steps to reproduce?

Just copy-paste the code in the theming guide and build.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Angular 4.2.4, Material 2.0.0-beta.7, Windows 10, TypeScript 2.3.4

Is there anything else we should know?

The console outputs this error:

ERROR in ./~/css-loader?{“sourceMap”:false,“importLoaders”:1}!./~/postcss-loader?{“ident”:“postcss”}!./~/sass-loader/lib/loader.js?{“sourceMap”:false,“precision”:8,“includePaths”:[]}!./src/tendeens.scss Module build failed: undefined ^ Argument $map of map-get($map, $key) must be a map Backtrace: node_modules/@angular/material/_theming.scss:1070, in function map-get node_modules/@angular/material/_theming.scss:1070, in function mat-palette stdin:12 in Z:\customers\tendeens\webapp\node_modules@angular\material_theming.scss (line 1070, column 14) @ ./src/tendeens.scss 4:14-191 @ multi ./src/tendeens.scss ./src/styles.css

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
miniskulljobcommented, Jun 28, 2017

Ok, there’s no error, it was my mistake. I thought that the mixin mat-palette would generate the palette of colors from one hex/rgb/hsl color, but it doesn’t work like that… I looked at the theming file to get a base palette and modify it so I could use my colors. Pretty strightforward:

$tendeens-green: ( 50: #e6fffa, 100: #9affe9, 200: #62ffdd, 300: #1affcd, 400: #00fbc4, 500: #00dcac, 600: #00bd94, 700: #009f7c, 800: #008064, 900: #00624c, A100: #e6fffa, A200: #9affe9, A400: #00fbc4, A700: #009f7c, contrast: ( 50: $black-87-opacity, 100: $black-87-opacity, 200: $black-87-opacity, 300: $black-87-opacity, 400: $black-87-opacity, 500: white, 600: white, 700: white, 800: $white-87-opacity, 900: $white-87-opacity, A100: $black-87-opacity, A200: $black-87-opacity, A400: $black-87-opacity, A700: $black-87-opacity, ) );

I’ll close it since there’s no issue here. Thanks and sorry for the inconvinience.

0reactions
angular-automatic-lock-bot[bot]commented, Sep 6, 2019

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

I have an error when doing the custom theme build
I have an error when doing the custom theme build, I get the following error when I run the following command bin/console gold:assets:build...
Read more >
2919919 - Silent Errors displayed when building custom theme
A pop-up is displayed informing about Silent Errors after building a custom theme on the UI Theme Designer.
Read more >
shinyDashboardThemes errors on DIY custom theme · Issue #32
The reason is that the custom theme is a shiny.tag object and not character. The function also throws a bunch of warnings (...
Read more >
10 Common WordPress Theme Issues & How To Fix Them
The “failed” to import error is usually 1 of 2 things. The first is that it could be trying to load posts or...
Read more >
Attempting to create a custom theme might return the error ...
When you are using the SAS® Theme Designer for Flex to create a custom theme, you might encounter the following error: Image save...
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