codu-code / codu

Codú's open-source codebase. A space for coders. Visit our community!
https://codu.co/
Apache License 2.0
122 stars 102 forks source link

Node version in package.json is 18.17.1 but db:seed script needs crypto from 20.x #1048

Open JohnAllenTech opened 6 hours ago

JohnAllenTech commented 6 hours ago

Context

Using node v18.18.0 seed script fails with

image

due to

 id: text("id")
      .primaryKey()
      .$defaultFn(() => crypto.randomUUID()),

in drizzle schema.

Expected Behavior

Seed script should run with node version specified in package.json

Current Behavior

Seed script doesnt run with node version specified in package.json

Screenshots

Drag and drop screenshots here to better describe your issue

Steps to reproduce

Please provide detailed steps for reproducing the issue

  1. Switch your node version to 18.x
  2. run npm run db:seed

Additional info

Could be a 1 liner. Maybe crypto was only added in v20 ?

github-actions[bot] commented 6 hours ago

Uh oh! @JohnAllenTech, the image you shared is missing helpful alt text. Check your issue body.

Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.

Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.