ricokahler / sanity-codegen

Generate TypeScript types from your Sanity.io schemas
sanity-codegen-dev.vercel.app
MIT License
270 stars 19 forks source link

Process hangs on M1 Mac #232

Closed alexbchr closed 2 years ago

alexbchr commented 2 years ago

We just got a new M1 Mac for someone on our team and everything in our codebase works fine except the sanity-codegen CLI. sanity-codegen has been setupped for quite a while in this project and is working fine on every Mac and Windows machine, except the Mac with the M1 processor.

We're using the latest version of sanity-codegen (0.9.8).

Basically when executing sanity-codegen, the process simply doesn't do anything. Nothing gets printed in the Terminal and we are simply executing yarn sanity-codegen.

ricokahler commented 2 years ago

Ah very interesting. As far as I'm aware, this package doesn't use any sort of dependencies that wouldn't work on an M1 mac (no native etc) so I don't have any hunches atm. Have you also tested this one non-M1 machines on a fresh install (i.e. delete node_modules + lock files)?

I also have an M1 mac. If you can set up a reproduction, I can give it a try myself.

alexbchr commented 2 years ago

Thanks @ricokahler for the info! Actually, just tried doing just that (removing the node_modules and yarn.lock) both on the M1 machine and on one of our Intel Macbooks. The issue still persist on the M1 Mac and I still don't have the issue on the Intel one.

Some clarifications though:

I don't know if you have an idea, if not, I'll reproduce the issue in its own repo, so we can hopefully take a look at this.

alexbchr commented 2 years ago

Quick follow-up here. I still have no idea what the issue is honestly, but we received another M1 Max laptop this week and can confirm that the issue is not the M1 chip.

I'll investigate a bit more on our end to check what the issue could be and I'll close this for now. Once I get a better understanding of the issue I may open another issue with more details, if relevant to sanity-codegen.

Sorry for the trouble and thanks again for the help!