davidmyersdev/vite-plugin-node-polyfills

Writable.toWeb is not a function

TRSescada opened this issue · 2 comments

I am trying to import and work with Writable from the library stream and it says it is not a function

import {Writable} from "node:stream"; 
await readableStream?.pipeTo(Writable.toWeb(writeStream));

here is my vite.config.js :

import { defineConfig } from 'vite'
import { nodePolyfills } from 'vite-plugin-node-polyfills'
export default defineConfig({
  plugins: [
    nodePolyfills({
      overrides: {
        fs: 'memfs',
      },
    }),
  ],
})

ps: i have tried to override as well for stream and got this issue : GET http://URL.... 504 (Outdated Optimize Dep)

Would you mind adding a StackBlitz or CodeSandbox reproduction of this issue for me to debug?

Closing due to lack of activity/reproduction.