DT
Drizzle Teamβ€’11mo ago
Paul

SyntaxError: Invalid or unexpected token when trying to push:

Hey all. I've just created a turso database and want to push. I'm getting the following error: SyntaxError: Invalid or unexpected token Any ideas why? Thanks
paul@Pauls-MacBook-Pro db % pnpm db:push

> @golfcart/[email protected] db:push /Users/paul/development/src/golf_cart/packages/db
> pnpm with-env drizzle-kit push:sqlite


> @golfcart/[email protected] with-env /Users/paul/development/src/golf_cart/packages/db
> dotenv -e ../../.env -- "drizzle-kit" "push:sqlite"

No config path provided, using default path
Reading config file '/Users/paul/development/src/golf_cart/packages/db/drizzle.config.ts'
drizzle-kit: v0.20.10
drizzle-orm: v0.29.3

/Users/paul/development/src/golf_cart/packages/db/src/schema/.DS_Store:1



SyntaxError: Invalid or unexpected token
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1178:20)
at Module._compile (node:internal/modules/cjs/loader:1220:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at newLoader (/Users/paul/development/src/golf_cart/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:8648:13)
at Object.newLoader (/Users/paul/development/src/golf_cart/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:8648:13)
at extensions..js (/Users/paul/development/src/golf_cart/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:11176:28)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Module.require (node:internal/modules/cjs/loader:1143:19)
paul@Pauls-MacBook-Pro db % pnpm db:push

> @golfcart/[email protected] db:push /Users/paul/development/src/golf_cart/packages/db
> pnpm with-env drizzle-kit push:sqlite


> @golfcart/[email protected] with-env /Users/paul/development/src/golf_cart/packages/db
> dotenv -e ../../.env -- "drizzle-kit" "push:sqlite"

No config path provided, using default path
Reading config file '/Users/paul/development/src/golf_cart/packages/db/drizzle.config.ts'
drizzle-kit: v0.20.10
drizzle-orm: v0.29.3

/Users/paul/development/src/golf_cart/packages/db/src/schema/.DS_Store:1



SyntaxError: Invalid or unexpected token
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1178:20)
at Module._compile (node:internal/modules/cjs/loader:1220:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at newLoader (/Users/paul/development/src/golf_cart/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:8648:13)
at Object.newLoader (/Users/paul/development/src/golf_cart/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:8648:13)
at extensions..js (/Users/paul/development/src/golf_cart/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:11176:28)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Module.require (node:internal/modules/cjs/loader:1143:19)
2 Replies
Paul
PaulOPβ€’11mo ago
If I do a check:
paul@Pauls-MacBook-Pro db % pnpm drizzle-kit check:sqlite
drizzle-kit: v0.20.10
drizzle-orm: v0.29.3

No config path provided, using default 'drizzle.config.ts'
Reading config file '/Users/paul/development/src/golf_cart/packages/db/drizzle.config.ts'
Everything's fine 🐢πŸ”₯
paul@Pauls-MacBook-Pro db % pnpm drizzle-kit check:sqlite
drizzle-kit: v0.20.10
drizzle-orm: v0.29.3

No config path provided, using default 'drizzle.config.ts'
Reading config file '/Users/paul/development/src/golf_cart/packages/db/drizzle.config.ts'
Everything's fine 🐢πŸ”₯
πŸ€·β€β™‚οΈ Is this the issue?
/Users/paul/development/src/golf_cart/packages/db/src/schema/.DS_Store:1
Is it trying to parse this file? I had to actually delete the .DS_Store file
paul@Pauls-MacBook-Pro db % pnpm drizzle-kit push:sqlite
No config path provided, using default path
Reading config file '/Users/paul/development/src/golf_cart/packages/db/drizzle.config.ts'
drizzle-kit: v0.20.10
drizzle-orm: v0.29.3

[βœ“] Changes applied
paul@Pauls-MacBook-Pro db % pnpm drizzle-kit push:sqlite
No config path provided, using default path
Reading config file '/Users/paul/development/src/golf_cart/packages/db/drizzle.config.ts'
drizzle-kit: v0.20.10
drizzle-orm: v0.29.3

[βœ“] Changes applied
Paul
PaulOPβ€’11mo ago
GitHub
[BUG]: Pushing db. SyntaxError: Invalid or unexpected token Β· Issu...
What version of drizzle-orm are you using? 0.29.3 What version of drizzle-kit are you using? 0.20.10 Describe the Bug I've just created a turso database and want to push. I'm getting the fo...
Want results from more Discord servers?
Add your server