timdeschryver / zod-fixture

Creating fixtures based on zod schemas
https://zod-fixture.timdeschryver.dev/
MIT License
121 stars 10 forks source link

1.1+ is giving me "ReferenceError: navigator is not defined" on React Native app #7

Closed justinadkins closed 1 year ago

justinadkins commented 1 year ago

I'm trying to use the latest version of this package but am running into the error in the title.

It looks like 1.1 was a dependency bump. Does one of the dependencies assume we are running in a browser?

ArtiomTr commented 1 year ago

Same here, I'm receiving an error self is not defined. Looks like, in the latest version, a new dependency was added - cuid. The cuid package has different outputs for browser, react-native and node environments. I think that vite automatically bundles the browser version. Maybe we should exclude cuid and @paralleldrive/cuid2 from the bundle?

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 1.6.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: