Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARM / mac M1 support #873

Closed
stillmatic opened this issue Jun 16, 2023 · 5 comments · Fixed by #874 or #814
Closed

ARM / mac M1 support #873

stillmatic opened this issue Jun 16, 2023 · 5 comments · Fixed by #874 or #814

Comments

@stillmatic
Copy link
Contributor

stillmatic commented Jun 16, 2023

Hello, I'm trying to install the package on M1 Mac and it is failing to do so -- panic: could not run [generate --schema ../../packages/db/prisma/schema.prisma --verbose]: fork/exec /Users/hua/Library/Caches/prisma/binaries/cli/4.15.0/prisma-cli-darwin-x64: bad CPU type in executable. It appears that when searching for binary, the package hardcodes x64 https://github.com/steebchen/prisma-client-go/blob/main/binaries/binaries.go#L25.

The packages are properly built, eg prisma-cli-4.15.0-darwin-arm64.gz - I think that we just need to add the architecture (x64 or arm64) as an argument to the URL.

I'm happy to make a PR for that, I think it should be pretty straightforward.

@steebchen
Copy link
Owner

Thanks for reporting, will take a look

@steebchen
Copy link
Owner

Do you have rosetta enabled/installed? Because I'm also on M1 but I think it uses rosetta for me

@stillmatic
Copy link
Contributor Author

no, I don't use Rosetta, which would explain why it works in your case

I think #874 should solve it, but let me test it real quick.

@steebchen
Copy link
Owner

steebchen commented Jun 16, 2023

Thanks looks good, see my comment

I also need to select the correct Prisma engine actually, such as darwin-arm64 instead of darwin, but I can handle that, unless you are already working on it :D

@steebchen steebchen linked a pull request Jun 16, 2023 that will close this issue
@steebchen
Copy link
Owner

dupe of #809

@steebchen steebchen linked a pull request Jun 21, 2023 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
2 participants