Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup bundle error trying to import default from web-streams-polyfill #7

Open
olizilla opened this issue Jun 25, 2021 · 0 comments
Open

Comments

@olizilla
Copy link

Using rollup to bundle a module that depends on @web-std/fetch I'm hitting an error:

@web-std/blob (imported by src/platform.js, node_modules/@web-std/fetch/src/index.js, node_modules/@web-std/fetch/src/body.js)
[!] Error: 'default' is not exported by node_modules/web-streams-polyfill/dist/polyfill.mjs, imported by node_modules/@web-std/fetch/src/body.js
https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module
node_modules/@web-std/fetch/src/body.js (12:7)
10: 
11: import {Blob} from '@web-std/blob';
12: import WebStreams from 'web-streams-polyfill';

Looking at

io/fetch/src/index.js

Lines 21 to 26 in 68e89a8

import WebStreams from 'web-streams-polyfill';
import {pipeline as pump, PassThrough} from 'stream';
import * as Stream from 'stream';
import {Blob} from '@web-std/blob';
const {ReadableStream} = WebStreams;

and https://github.com/MattiasBuelens/web-streams-polyfill/blob/956de3d56a1c4565563f85f9180d4bac39571b74/src/polyfill.ts#L19-L38

it looks like there is no default export from web-streams-polyfill

@olizilla olizilla changed the title Rollup bundle error trying to import default from 'web-streams-polyfill' Rollup bundle error trying to import default from web-streams-polyfill Jun 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant