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.

Emotion versioning

See original GitHub issue

Bug Report

Emotion version seems to be inconsistent

I’m getting import errors in npm around @emotion/, specifically some referenced classes. @emotion/core and @emotion/styled seem to be pulling incompatible versions. I don’t see a peer dependency for emotion in the docs but adding v10.0.5 of @emotion/core and @emotion/styled seems to fix the problem.

Perhaps I’m just missing the part of the docs or package.json where it’s a peer dependency?

To Reproduce

  1. Delete package-lock.json and node_modules
  2. npm i docz docz-theme-default
  3. npm run docz:dev

The import errors I’m seeing without @emotion as a dependency:

./node_modules/docz-theme-default/dist/index.m.js
Attempted import error: 'ClassNames' is not exported from '@emotion/core'.

./node_modules/emotion-theming/dist/emotion-theming.browser.esm.js
Attempted import error: 'ThemeContext' is not exported from '@emotion/core'.

./node_modules/emotion-theming/dist/emotion-theming.browser.esm.js
Attempted import error: 'ThemeContext' is not exported from '@emotion/core'.

./node_modules/emotion-theming/dist/emotion-theming.browser.esm.js
Attempted import error: 'ThemeContext' is not exported from '@emotion/core'.

The warnings when I have emotion/core and emotion/styled as depdencies:

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN @emotion/styled-base@0.10.6 requires a peer of @emotion/core@0.x.x but none is installed. You must install peer dependencies yourself.
npm WARN @emotion/styled-base@0.10.6 requires a peer of @emotion/core@0.x.x but none is installed. You must install peer dependencies yourself.
npm WARN @emotion/styled-base@0.10.6 requires a peer of @emotion/core@0.x.x but none is installed. You must install peer dependencies yourself.
npm WARN react-docgen-typescript-loader@2.2.0 requires a peer of typescript@* but none is installed. You must install peer dependencies yourself.
npm WARN @emotion/provider@0.11.2 requires a peer of @emotion/core@0.x.x but none is installed. Youmust install peer dependencies yourself.
npm WARN react-treebeard@3.1.0 requires a peer of @emotion/styled@^0.10.6 but none is installed. You must install peer dependencies yourself.
npm WARN react-docgen-typescript-loader@3.0.0 requires a peer of typescript@* but none is installed. You must install peer dependencies yourself.

The documentation is compiled successfully with these warnings.

Expected behavior

Should emotion be documented as a peer dependency?

Environment

  • OS: OSX 10.14.1
  • Node/npm version: Node 10.13.0/npm 6.5.0
  • docz / docz-theme-default: ^0.13.2

Additional context/Screenshots

Forgive me if this is off base…

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:13
  • Comments:11

github_iconTop GitHub Comments

1reaction
rot1024commented, Jan 7, 2019

In my project and docz v0.13.7, this error still prevents updating modules and yarn.lock. Clearing node_modules and yarn.lock, or installing @emotion/cache, or using npm instead of yarn doesn’t work.

0reactions
nerdmaxcommented, Jan 19, 2019

Yes, @emotion/core and @emotion/styled have already installed.

However that issue is already been cleared up.

  1. Install and save @emotion/cache
  2. Regenerate yarn.lock: rm yarn.lock && yarn
  3. Docz works well

But it is strange as actually @emotion/cache should not be necessary to install…

Agreed! Don’t know why @emotion/cache needs to be installed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Emotion versioning · Issue #522 · doczjs/docz - GitHub
Bug Report Emotion version seems to be inconsistent I'm getting import errors in npm around @emotion/, specifically some referenced classes.
Read more >
Cover versions of Emotion by Bee Gees | SecondHandSongs
Emotion by Bee Gees was written by Barry Gibb and Robin Gibb and was first released by Samantha Sang in 1977. Bee Gees...
Read more >
How to Align MyMon and eMotion LV1 App Versions | Support
To prevent a version mismatch between eMotion LV1 and MyMon, check the guidelines on ... How to Align MyMon and eMotion LV1 App...
Read more >
All That Emotion Versions - Hannah Georgas - Bandcamp
All That Emotion Versions by Hannah Georgas, released 25 June 2021 1. Pray It Away (feat. Matt Berninger) 2. Kate Stables & Hannah...
Read more >
State-based measurement of emotion ... - Springer Link
Namely, the Turkish versions of the SERI and the S-DERS would predict participants' emotional states and symptom levels while controlling ...
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