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
We have a next.js application wich have pages and components wich fetches data server side.
The problem is that webpack crashes as it tries to use node libraries.
Module build failed: UnhandledSchemeError: Reading from "node:http" is not handled by plugins (Unhandled scheme). Webpack supports "data:" and "file:" URIs by default. Module build failed: UnhandledSchemeError: Reading from "node:fs" is not handled by plugins (Unhandled scheme). Webpack supports "data:" and "file:" URIs by default. ....
Storybook writes that you can either rewrite alle you components/pages to or polyfill those modules in your Storybook's webpackFinal configuration.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Summary
Hi
We have a next.js application wich have pages and components wich fetches data server side.
The problem is that webpack crashes as it tries to use node libraries.
Module build failed: UnhandledSchemeError: Reading from "node:http" is not handled by plugins (Unhandled scheme). Webpack supports "data:" and "file:" URIs by default. Module build failed: UnhandledSchemeError: Reading from "node:fs" is not handled by plugins (Unhandled scheme). Webpack supports "data:" and "file:" URIs by default. ....
Storybook writes that you can either rewrite alle you components/pages to or polyfill those modules in your Storybook's webpackFinal configuration.
Im trying to do the last, but am kind of lost.
I also tried using node-polyfill-webpack-plugin with no luck.
Has anyone had any luck doing this?
Additional information
No response
Create a reproduction
No response
Beta Was this translation helpful? Give feedback.
All reactions