developit / developit/unfetch

[Bug]: use of isomorphic-unfetch breaks storybook-next build

Aperta
#174 0 commenti 2 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
5.7k
Fork
204
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

We're experiencing a problem using `isomorphic-unfetch` in `storybook` together with `nextjs`. Even though it works fine in the `next` build, importing `isomorphic-unfetch` in a component in `storybook` causes several errors.
```
Module not found: Error: Can't resolve 'unfetch' in '/Users/martaver/Projects/repro/node_modules/isomorphic-unfetch'
```
and several of:
```
Module build failed: UnhandledSchemeError: Reading from "node:buffer" is not handled by plugins (Unhandled scheme).
Webpack supports "data:" and "file:" URIs by default.
You may need an additional plugin to handle "node:" URIs.
```

I've documented the problem and provided a full repro in the `storybook` repo, since it seems to be caused by a difference between how `storybook` and `next` are built, but I thought I'd also flag the issue here, in case the authors might have some insight:

https://github.com/storybookjs/storybook/issues/23700

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.