Theme-ui: warn "export 'ColorMode' was not found in 'theme-ui'

Created on 25 Apr 2020  路  10Comments  路  Source: system-ui/theme-ui

Describe the bug
Just updated theme-ui to latest version - 0.3.1, "gatsby-theme-ui": "0.2.0",. After the build I got in console:

warn "export 'ColorMode' was not found in 'theme-ui'

Additional context
Add any other context about the problem here.

Got some strange styles in the browser right after upgrading.

小薪懈屑芯泻 褝泻褉邪薪邪 2020-04-25 胁 18 59 56

I don't use colors in my theme.js, it's important. It was never an issue.

Most helpful comment

You'll also need to update the gatsby plugin to 0.3.0

All 10 comments

Hey! Highly recommend checking out the Migrating guide, here: https://theme-ui.com/migrating

ColorMode was deprecated, in short, among other changes. Try following each of the steps there & report back if something鈥檚 still wrong. 馃憤

I've already tried 'migration' steps, but still no luck :(

@Defite Ok cool. So the ColorMode component is deprecated/no longer needed鈥攄id you remove it from your project? Can you post the code triggering this issue?

@lachlanjc I've never used ColorMode before :) https://github.com/Defite/gatsby-theme-defite/tree/theme-v2 here is my work in progress, and here is theme.js: https://github.com/Defite/gatsby-theme-defite/blob/theme-v2/gatsby-theme-defite/src/theme.js

Honestly, never used Gatsby Themes before so a bit out of my depth here. Sorry.

How can I help you with that? Is my theme.js looks ok?

You'll also need to update the gatsby plugin to 0.3.0

You'll also need to update the gatsby plugin to 0.3.0

and it is gatsby-plugin-theme-ui...

Installing [email protected] resolves this issue, thank you, @LekoArts

You'll also need to update the gatsby plugin to 0.3.0

LekoArts, Thank you for your solution. I think the gatsby-theme-blog packages also need to update the theme-ui to latest version

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LeunensMichiel picture LeunensMichiel  路  3Comments

8eecf0d2 picture 8eecf0d2  路  3Comments

muhajirdev picture muhajirdev  路  3Comments

calvinwyoung picture calvinwyoung  路  3Comments

mxstbr picture mxstbr  路  3Comments