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.

Failing Storybook build

See original GitHub issue

Current Behavior

Getting error during build phase - ERR! => Failed to build the preview NX Module not found: Error: Can't resolve '../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js'

Expected Behavior

Build without errors

Steps to Reproduce

Try to build Storybook on Windows (MacOS without any troubles) after upgrade of @emotion/react package to version 11.10.0 build is failing (working after downgrade to 11.9.3)

I assume it’s caused by absence of dependencies

yarn.lock
@emotion/react@11.9.3":
  version "11.9.3"
  dependencies:
    "@babel/runtime" "^7.13.10"
    "@emotion/babel-plugin" "^11.7.1"
    "@emotion/cache" "^11.9.3"
    "@emotion/serialize" "^1.0.4"
    "@emotion/utils" "^1.1.0"
    "@emotion/weak-memoize" "^0.2.5"
    hoist-non-react-statics "^3.3.1"

Especially babel-plugin

Failure Logs

See above

Environment

Node : 14.18.0
   OS   : darwin x64
   yarn : 1.22.10
   
   nx : 14.5.10
   @nrwl/angular : Not Found
   @nrwl/cypress : 14.5.10
   @nrwl/detox : Not Found
   @nrwl/devkit : 14.5.10
   @nrwl/eslint-plugin-nx : 14.5.10
   @nrwl/express : Not Found
   @nrwl/jest : 14.5.10
   @nrwl/js : 14.5.10
   @nrwl/linter : 14.5.10
   @nrwl/nest : Not Found
   @nrwl/next : Not Found
   @nrwl/node : Not Found
   @nrwl/nx-cloud : Not Found
   @nrwl/nx-plugin : Not Found
   @nrwl/react : 14.5.10
   @nrwl/react-native : Not Found
   @nrwl/schematics : Not Found
   @nrwl/storybook : 14.5.10
   @nrwl/web : 14.5.10
   @nrwl/workspace : 14.5.10
   typescript : 4.7.4
   --------------------------

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
davidslabycommented, Sep 26, 2022

@mandarini exactly 🙂 Thank you for support!

1reaction
davidslabycommented, Sep 26, 2022

Downgrade of @emotion/react from version 11.10.4 to 11.9.3 should solve this issue. There is some issue with imports and / on Windows.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Storybook build failed after updating to version 6.5.3 #18276
Running storybook after updating to the latest version causes webpack error. ... In the previous configuration, everything worked fine. The latest ...
Read more >
Storybook build fails everytime - Stack Overflow
It has happend because I run command ( yarn start-storybook --debug-webpack in my case) within non-appropriate direcotry.
Read more >
CLI options - Storybook
Storybook is a frontend workshop for building UI components and pages in isolation. Thousands of teams use it for UI development, testing, and...
Read more >
Errors component • chromaui/chromatic-cli
The CLI tried to run your build:storybook script, but the command failed. This indicates a problem with your Storybook. Here's what to do:...
Read more >
@storybook/react - npm
Storybook for React: Develop React Component in isolation with Hot ... Failing to do so can lead to unforeseen issues with Storybook and ......
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