You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was finally able to create a reproducible env for the bug that we experience during the migration of our webpack to rspack setup. The error that is thrown when SSR-ing the react content from the server with:
TypeError: Cannot read properties of undefined (reading 'ReactCurrentDispatcher')
We have a reproducible env where we bundle the application in 3 different flavours and our setup works on 2 of the 3 modes:
System Info
System:
OS: macOS 14.6
CPU: (10) arm64 Apple M1 Pro
Memory: 111.52 MB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.18.2 - ~/.nvm/versions/node/v18.18.2/bin/node
npm: 9.8.1 - ~/.nvm/versions/node/v18.18.2/bin/npm
pnpm: 9.7.0 - ~/.nvm/versions/node/v18.18.2/bin/pnpm
bun: 1.1.12 - /opt/homebrew/bin/bun
Browsers:
Chrome: 128.0.6613.84
Safari: 17.6
npmPackages:
@rspack/cli: ^0.7.5 => 0.7.5
@rspack/core: ^0.7.5 => 0.7.5
Details
I was finally able to create a reproducible env for the bug that we experience during the migration of our webpack to rspack setup. The error that is thrown when SSR-ing the react content from the server with:
TypeError: Cannot read properties of undefined (reading 'ReactCurrentDispatcher')
We have a reproducible env where we bundle the application in 3 different flavours and our setup works on 2 of the 3 modes:
Reproduce link
https://github.com/MarcoLeko/rspack-can-not-read-property-of-undefined
Reproduce Steps
Steps to reproduce
I've provided a minimal reproducible env, to test it out:
Clone: Reproducible error project
Execute npm ci
Run: npm run webpack:swc:dev:server
Hit route: http://localhost:3001/ => works ✅
Run: npm run webpack:babel:dev:server
Hit route: http://localhost:3001/ => works ✅
*Run: npm run rspack:dev:server
Hit route: http://localhost:3001/ => will fail with TypeError: Cannot read properties of undefined (reading 'ReactCurrentDispatcher')🔴
The text was updated successfully, but these errors were encountered: