Skip to content

[Bug] Cannot use stream plugin with elysia-polyfills (Node) #5

@lnfel

Description

@lnfel

.pnpm/@elysiajs[email protected][email protected]/node_modules/@elysiajs/stream/dist/index.js:1
import { nanoid } from 'nanoid';
^^^^^^

SyntaxError: Cannot use import statement outside a module
Node.js v18.14.2

While Bun supports both es6 module and commonjs, node is stuck on using only one or the other. Adding type: module in package.json would likely fix the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions