Skip to content

TypeError: Expected input type is Uint8Array (got object) #44

@zygopleural

Description

@zygopleural

Been trying to upgrade to cuid2 from cuid on-off for a while now but never been able to solve this issue. Hoping maintainers or community can help.

I installed with the following:

yarn remove cuid
yarn add @paralleldrive/cuid2

And my diffs are essentially

- import cuid from "cuid"
+ import cuid2 from "@paralleldrive/cuid2"
- cuid()
+ cuid2.createId()

But I'm always seeing the error:

TypeError: Expected input type is Uint8Array (got object)

> 1 | import cuid2 from "@paralleldrive/cuid2"

Same with:

TypeError: Expected input type is Uint8Array (got object)

> 1 | import { createId } from "@paralleldrive/cuid2"

Only seems to be a problem on my web package, my api is not complaining.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions