Error: NormalModuleFactory.afterResolve (ReactRefreshPlugin) is no longer a waterfall hook, but a bailing hook instead.
See original GitHub issueDescription
Created a fresh and new project using gatsby V3.
running gatsby develop
results in a build error.
Steps to reproduce
run npm init gatsby
, run develop. fail
Expected result
Initial project should run
Actual result
Environment
System: OS: macOS 11.2 CPU: (16) x64 Intel® Core™ i9-9880H CPU @ 2.30GHz Shell: 5.8 - /bin/zsh Binaries: Node: 12.18.3 - ~/.nvm/versions/node/v12.18.3/bin/node Yarn: 1.22.1 - /usr/local/bin/yarn npm: 6.14.9 - ~/.nvm/versions/node/v12.18.3/bin/npm Languages: Python: 2.7.16 - /usr/bin/python Browsers: Chrome: 88.0.4324.192 Edge: 88.0.705.81 Firefox: 85.0.2 Safari: 14.0.3
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:18 (6 by maintainers)
Top Results From Across the Web
NormalModuleFactory.afterResolve is no longer a waterfall ...
Webpack build crashes with error Error: NormalModuleFactory.afterResolve is no longer a waterfall hook, but a bailing hook instead.
Read more >webpack - --mode development Error: NormalModuleFactory ...
Error: NormalModuleFactory.beforeResolve is no longer a waterfall hook, but a bailing hook instead. Do not return the passed object, ...
Read more >FAST_REFRESH=true causes compilation error (Webpack 5 ...
I'm seeing this problem too ("no longer a waterfall hook, but a bailing hook instead") -- it does indeed look like a new...
Read more >NormalModuleFactory.afterResolve is no longer a waterfall hook
When I tried Webpack 5 RC 0, I received the following error. It looks like this module may be the cause. webpack@5.0.0-rc-0 tapable@2.0.0 ......
Read more >Migrating from v2 to v3 - Gatsby
Error : NormalModuleFactory.afterResolve (ReactRefreshPlugin) is no longer a waterfall hook, but a bailing hook instead. An effective way to get around this ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had this issue as well, and nuking
node_modules
fixed it… but this isn’t a suitable answer given that this is what most people would be doing. I was upgrading a project with lots of dependencies from gatsby v2 to v3.After lots of trial and error, I was able to create a minimal reproduction and determine the issue is a webpack version conflict. One of my dependencies has webpack@4 listed as a dependency. When you upgrade from Gatsby v2 to v3, it doesn’t install webpack@5 as expected, or indeed, as required. When you do a fresh install after upgrading to v3, it will correctly install webpack@5.
https://github.com/njbmartin/gatsby-v3-upgrade-issue
For what it’s worth cleaning
node_modules
andpackage-lock.json
didn’t fix it for me. I had tonpm i -D webpack@latest --legacy-peer-deps
as suggested https://github.com/gatsbyjs/gatsby/issues/29975#issuecomment-792294965