🐛 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 playground directory
-
Run:
-
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:
💡 Possible Solutions
We should consider one of the following:
- Update
next.config.mjs to include a Turbopack-compatible configuration that aliases or mocks the fs module.
- Update the
npm start script to explicitly use --webpack until proper Turbopack support is added.
🖥️ Environment
- OS: Windows
- Node.js Version: 25.5.0
- Next.js Version:
16.1.5
🐛 Description
When running
npm startin the playground directory, the build fails with the following error: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.mjsthat mocks thefsmodule (fs: false).🔁 Steps to Reproduce
Navigate to the
playgrounddirectoryRun:
Observe the build failure with:
✅ Expected Behavior
The playground should start successfully in development mode, consistent with the behavior when using Webpack.
Running Next.js explicitly with Webpack resolves the issue temporarily:
💡 Possible Solutions
We should consider one of the following:
next.config.mjsto include a Turbopack-compatible configuration that aliases or mocks thefsmodule.npm startscript to explicitly use--webpackuntil proper Turbopack support is added.🖥️ Environment
16.1.5