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.

v11.5.0 breaks the Theme export

See original GitHub issue

Current behavior:

Version 11.5.0 breaks the Theme export in our library. When using the library in React applications I now get

 error TS2339: Property 'color' does not exist on type 'Theme'.

This used to work using v11.4.1 (and still does, if I just downgrade)

To reproduce:

n/a - I don’t think I can show this in a CodeSandbox example 😦

Expected behavior:

TypeScript complies the React app without error

Environment information:

  • react version: 17.0.2
  • @emotion/react version: 11.5.0
  • typescript version: 4.4.4

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
Andaristcommented, Oct 20, 2021

Please always try to share a repro case in a runnable form - either by providing a git repository to clone or a codesandbox. OSS maintainers usually can’t afford the time to set up the repro, even if exact steps are given.

0reactions
Snaptagscommented, Oct 21, 2021

@tpict In my case the problem had been caused by a broken dependency tree. We had @emotion/react in the dependencies array of both our lib and the React app. We forgot to update the dependency in the app, too, i.e. installing the updated lib broke the dependency tree.

As far as theming is concerned: we just followed the docs at https://emotion.sh/docs/typescript In our lib we re-export the theme using

import * as Emotion from "./@types/emotion";

export { Emotion };

in the lib’s index.ts

Read more comments on GitHub >

github_iconTop Results From Across the Web

[@types/styled-components] 4.1.0 breaks themes · Issue #30536
Defining own props to styled-component is failing for me as well. This code: import styled from 'styled-components' export const Button ...
Read more >
ThemeNectar | Changelogs - Salient
Version 3.0.5. Fixed admin javascript from breaking for non-admin users; Decreased theme zip size to get rid of "Are you sure you want...
Read more >
Why am I getting "no exported member" errors when ...
The issue. I am trying to upgrade from Angular V9 to V11 and I'm struggling quite a lot with ...
Read more >
Breaking Export function on Divi Theme - WordPress.org
I have been able to confirm that on php8.0, WP-Optimize – Cache, Clean, Compress (Version: 3.2.7) is breaking the ability to export DIVI...
Read more >
ngx-echarts - npm
Since v5.0 · If you need ECharts GL support, please install it first: npm install echarts-gl -S # or yarn add echarts-gl ·...
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