-
-
Notifications
You must be signed in to change notification settings - Fork 174
Open
Description
🐛 Description
When running npm start in the playground directory, the build fails with the following error:
Module not found: Can't resolve 'fs'
The error originates from dependencies such as avsc, which are pulled in via @asyncapi/parser.
This happens because Next.js 16 uses Turbopack by default in development mode, and Turbopack does not respect the existing Webpack configuration defined in next.config.mjs that mocks the fs module (fs: false).
🔁 Steps to Reproduce
-
Navigate to the
playgrounddirectory -
Run:
npm start
-
Observe the build failure with:
Module not found: Can't resolve 'fs'
✅ Expected Behavior
The playground should start successfully in development mode, consistent with the behavior when using Webpack.
⚠️ Workaround
Running Next.js explicitly with Webpack resolves the issue temporarily:
npx next dev --webpack💡 Possible Solutions
We should consider one of the following:
- Update
next.config.mjsto include a Turbopack-compatible configuration that aliases or mocks thefsmodule. - Update the
npm startscript to explicitly use--webpackuntil proper Turbopack support is added.
🖥️ Environment
- OS: Windows
- Node.js Version: 25.5.0
- Next.js Version:
16.1.5
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels