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.

FAST_REFRESH=true causes compilation error (Webpack 5 support)

See original GitHub issue

Describe the bug FAST_REFRESH=true causes compilation error. Same as if I would configure .storybook/main.js or add plugin manually into config.plugins.

To Reproduce Steps to reproduce the behavior:

  1. Default config
  2. FAST_REFRESH=true start-storybook

The same project builds successfully with webpack & @pmmmwh/react-refresh-webpack-plugin. The same storybook compiles without FAST_REFRESH=true

yarn run v1.22.10
$ FAST_REFRESH=true start-storybook
info @storybook/react v6.1.15
info => Using prebuilt manager
info => Loading presets
info => Loading 1 config file in "./.storybook"
info => Loading 7 other files in "./.storybook"
info => Adding stories defined in ".storybook/main.js"
info => Using React fast refresh
info => Using default Webpack setup
0% compilingERR! TypeError: Cannot read property 'tap' of undefined
ERR!     at /Users/dan/github/project/node_modules/@pmmmwh/react-refresh-webpack-plugin/lib/index.js:236:65

Expected behavior Succesful compilation

System

Environment Info:

  System:
    OS: macOS 11.1
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  Binaries:
    Node: 13.8.0 - ~/.nvm/versions/node/v13.8.0/bin/node
    Yarn: 1.22.10 - ~/.nvm/versions/node/v13.8.0/bin/yarn
    npm: 6.13.6 - ~/.nvm/versions/node/v13.8.0/bin/npm
  Browsers:
    Chrome: 88.0.4324.96
    Firefox: 84.0.2
    Safari: 14.0.2
  npmPackages:
    @storybook/addon-actions: ^6.1.15 => 6.1.15 
    @storybook/addon-essentials: ^6.1.15 => 6.1.15 
    @storybook/addon-links: ^6.1.15 => 6.1.15 
    @storybook/react: ^6.1.15 => 6.1.15 

Packages:

    "react-refresh": "^0.9.0",
    "webpack": "^5.18.0",
    "@pmmmwh/react-refresh-webpack-plugin": "^0.4.3",

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:21 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
shilmancommented, Feb 21, 2021

@timkindberg going to beta this week, final in about a month (knock wood)

2reactions
dcwarwickcommented, Aug 7, 2021

@shilman It works for us too with 6.4.0-alpha.25, many thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack 5 release (2020-10-10)
Webpack 5 has now native support for modules representing assets. ... This caused much stderr output and yielded a performance problem on ...
Read more >
Webpack-dev-server compiles files but does not refresh or ...
vue file it causes webpack to recompile), but: The browser never refreshes; The compiled javascript that gets stored in memory is never made ......
Read more >
ts-loader - npm
Failing the build on TypeScript compilation error. The build should fail on TypeScript compilation errors as of webpack 2. If for some reason...
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