Closed ar7casper closed 1 year ago
Found a solution, it has nothing to do with drizzle
, but since it happened while working with you, I think it might be a good idea for future devs -
So it's a matter of several moving parts. Involving ZSH, node versions and only then esbulid.
So, first thing I've done was running - node -p "process.arch"
, the answer was x64
.
Then, I did nvm uninstall 18
and nvm install 18
.
Same result.
Then I found that it might be a ZSH thing.
I ran - arch
and the answer was x64
.
So I did -
env /usr/bin/arch -arm64 /bin/zsh --login
(https://vineethbharadwaj.medium.com/m1-mac-switching-terminal-between-x86-64-and-arm64-e45f324184d9)
and now arch
returned arm64
.
Next, reinstalled node again nvm uninstall 18 && nvm install 18
and the answer of node -p "process.arch"
was arm64
.
Then I ran my code and the migration worked.
The only thing that's weird is that I'm using bun
, not node
.
I looked in the installed esbuild
module, they use node
there so that might be the reason, but I'm not sure and I don't have the time to dive deeper.
Hope it will help future devs.
Found a solution, it has nothing to do with
drizzle
, but since it happened while working with you, I think it might be a good idea for future devs -So it's a matter of several moving parts. Involving ZSH, node versions and only then esbulid.
So, first thing I've done was running -
node -p "process.arch"
, the answer wasx64
. Then, I didnvm uninstall 18
andnvm install 18
. Same result. Then I found that it might be a ZSH thing. I ran -arch
and the answer wasx64
. So I did -env /usr/bin/arch -arm64 /bin/zsh --login
(https://vineethbharadwaj.medium.com/m1-mac-switching-terminal-between-x86-64-and-arm64-e45f324184d9)and now
arch
returnedarm64
. Next, reinstalled node againnvm uninstall 18 && nvm install 18
and the answer ofnode -p "process.arch"
wasarm64
. Then I ran my code and the migration worked.The only thing that's weird is that I'm using
bun
, notnode
. I looked in the installedesbuild
module, they usenode
there so that might be the reason, but I'm not sure and I don't have the time to dive deeper.Hope it will help future devs.
This worked for me too. Thanks!
What version of
drizzle-orm
are you using?0.28.6
What version of
drizzle-kit
are you using?0.19.13
Describe the Bug
I'm using bun 1.0.3 as my everything (runner, package manager, etc.) I'm using a MacBook Pro M1 Max.
I have a
drizzle.config.ts
file with the following -the command I'm running is -
drizzle-kit generate:sqlite
In response, I get an error -
The weird part is that I can't understand why
node
is there.Another thing I checked is what
arch
I'm using. The output of -is "You're running natively on Aplle Silicon".
BUT, in the CLI, when I run
node -p "process.arch"
the response isx64
, meaning Roestta.Helpful links
https://blog.hao.dev/fixing-esbuild-related-cpu-architecture-error-on-apple-silicon-macs
Expected behavior
For stuff to work.
Environment & setup
Mac Pro M1 max.