Open theodufort opened 9 months ago
Lifesaver! bunx --bun did the trick.
I have the same problem here: SyntaxError: Unexpected token '<' I'm using pnpm by the way
For anyone experiencing weird issues when switching or playing with bun,node or npm.
Try this tag when using any package --bun
like bunx --bun drizzle-kit generate:sqlite --schema ./db/schema.ts
Im trying to generate an sqlite DB from a schema i created.
Environement:
What i tried:
sudo bunx drizzle-kit generate:sqlite --schema ./db/schema.ts
bunx drizzle-kit generate:sqlite --schema ./db/schema.ts
sudo npx drizzle-kit generate:sqlite --schema ./db/schema.ts
npx drizzle-kit generate:sqlite --schema ./db/schema.ts
The error i get for the 4 of those:
/media/disk1/Clones/bunjs-rest-api/app-api/node_modules/drizzle-kit/bin.cjs:4692 return
${idx.name};${idx.columns.join(",")};${idx.isUnique};${idx.using ?? ""};${idx.algorithm ?? ""};${idx.lock ?? ""}`; ^SyntaxError: Unexpected token '?' at wrapSafe (internal/modules/cjs/loader.js:915:16) at Module._compile (internal/modules/cjs/loader.js:963:27) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10) at Module.load (internal/modules/cjs/loader.js:863:32) at Function.Module._load (internal/modules/cjs/loader.js:708:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12) at internal/main/run_main_module.js:17:47 `
EDIT: For anyone experiencing weird issues when switching or playing with bun,node or npm. Try this tag when using any package
--bun
likebunx --bun drizzle-kit generate:sqlite --schema ./db/schema.ts