yarn dev failing with error from react-server-dom-webpack module
aruld opened this issue · comments
Hi, I am trying to run the demo and seeing an error when accessing http://localhost:3000
. Any clue why I am seeing this error?
arul@MacBook-Pro next-server-components % yarn dev
yarn run v1.22.10
$ next
Loaded env from /Users/arul/Documents/GitHub/nextjs/forks/next-server-components/.env
warn - You have enabled experimental feature(s).
warn - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use them at your own risk.
ready - started server on http://localhost:3000
event - compiled successfully
event - build page: /
wait - compiling...
event - compiled successfully
event - build page: /api
wait - compiling...
[BABEL] Note: The code generator has deoptimised the styling of /Users/arul/Documents/GitHub/nextjs/forks/next-server-components/libs/send-res.build.js as it exceeds the max of 500KB.
event - compiled successfully
API resolved without sending a response for /api?location=%7B%22selectedId%22%3Anull%2C%22isEditing%22%3Afalse%2C%22searchText%22%3A%22%22%7D, this may result in stalled requests.
/Users/arul/Documents/GitHub/nextjs/forks/next-server-components/node_modules/react-server-dom-webpack/cjs/react-server-dom-webpack.development.js:562
var reader = stream.getReader();
^
TypeError: stream.getReader is not a function
at startReadingFromStream (/Users/arul/Documents/GitHub/nextjs/forks/next-server-components/node_modules/react-server-dom-webpack/cjs/react-server-dom-webpack.development.js:562:23)
at /Users/arul/Documents/GitHub/nextjs/forks/next-server-components/node_modules/react-server-dom-webpack/cjs/react-server-dom-webpack.development.js:594:5
at runMicrotasks (<anonymous>)
at processTicksAndRejections (node:internal/process/task_queues:93:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
arul@MacBook-Pro next-server-components %
I think it's an issue in the react-server-dom-webpack
package. Currently the work around is to switch to old node versions such as v12. We will work on a proper fix.
Switching to v12 works like a charm! Thank you @shuding.
I noticed a warning from nextjs every time index page is loaded, do you think this could be related to react-server-dom-webpack
package?
API resolved without sending a response for /api?location=%7B%22selectedId%22%3Anull%2C%22isEditing%22%3Afalse%2C%22searchText%22%3A%22%22%7D, this may result in stalled requests.
@mattfwood It works with 12.21.0
, i see the same error, but it doesn't terminate the process. With 15.11.0
, it terminates the process.
The demo is fully rewritten now, close this issue as outdated 🙏