Buffer is not defined - drizzle-arktype
I got this error when importing a file that has
import { createInsertSchema, createSelectSchema } from 'drizzle-arktype'
into my vite app
6 Replies
Did u figure this out? getting the same issue here
Nope. One of us should file an issue
drizzle-arktype uses the node global "Buffer", as a workaround you could use vite-plugin-node-polyfills to polyfill it but it would be good to file an issue yeah
npm
vite-plugin-node-polyfills
A Vite plugin to polyfill Node's Core Modules for browser environments.. Latest version: 0.23.0, last published: 3 months ago. Start using vite-plugin-node-polyfills in your project by running
npm i vite-plugin-node-polyfills
. There are 110 other projects in the npm registry using vite-plugin-node-polyfills.Alright i filed
GitHub
[BUG]: Buffer is not defined using drizzle-arktype client side with...
Report hasn't been filed before. I have verified that the bug I'm about to report hasn't been filed before. What version of drizzle-orm are you using? 0.41.0 What version of drizzle-kit...
Will look into it, thanks for reporting