cli: Supabase fails to build after it installs on yarn 4
Describe the bug When trying to install Supabase using Yarn Berry 4.0.2 on a MacBook Pro with an M3 chip, the build process fails and exits with code 129. The error message states that Supabase must be built because it has never been built before or the last build failed. Additionally, during the installation process, the entire network connection on the laptop becomes unresponsive.
If I disable postinstall scripts with yarn it does install normally.
To Reproduce Steps to reproduce the behavior:
I am using the Tamagui Takeout stack (https://tamagui.dev/takeout). So I guess a lot of people will run into it starting on a fresh new Macbook M3.
Once I got it working when I did yarn cache clean, npm cache clean --forece and deleted all the node_modules. However it keeps failing which is why I decided to open this issue.
Expected behavior Supabase should be installed and postinstalled successfully without causing the network connection to become unresponsive.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: macOS (M3 chip)
- Version of CLI: 1.123.4
- Version of Node.js (if applicable): [Please fill this in with your Node.js version] v18.19.0
- Versiion of Yarn: 4.0.2
- Setup: Turborepo
Additional context The log file indicates that the postinstall script is trying to download the supabase CLI from https://github.com/supabase/cli/releases/download/v1.99.0/supabase_darwin_arm64.tar.gz and the checksums from https://github.com/supabase/cli/releases/download/v1.99.0/supabase_1.99.0_checksums.txt. However, it doesn’t provide any further details about why the build process fails. The logs for the failed build can be found at /private/var/folders/9c/lzt260ms1dj647flwv171fc00000gn/T/xfs-6e918d5d/build.log. Also it happens with other versions, but Takeout starts with 1.99.0 at the moment.
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 1
- Comments: 24 (6 by maintainers)
I still run into this issue, when will it be out of beta?
I’m still unable to reproduce this error. Could you try the following and let me know if it works?
I’m not sure if yarn supports dotenv natively https://github.com/yarnpkg/berry/issues/4718. May be it’s possible to update
.yarnrc.ymlfile as demonstrated in the issue.Even then, this is a nodejs config and not necessarily something yarn wants to handle. For simplicity, I’d suggest setting the env var before running yarn add command.
You only need to do this once during installation so it’s probably fine.
I’m having the same issue
Alright, I’ll pay attention to when this issue will be out of the beta release and test it once more!
Tried it.
The install took a long time. Then appeared to work as there were no errors. But no help was printed out. I tried the command again and was again prompted to install.
@RobSchilderr Totally agree. Just providing more data to help identify the issue
This could be related to a bug in node-fetch https://github.com/node-fetch/node-fetch/issues/1735. Let me switch the postinstall script to use native fetch.
I am having the same/similar issue. I am not able to reinstall the cli tool at all completely halting my local development.
I used to have it installed and working but did a rm -rf to node_modules the other week. Since then I have not been able to reinstall the cli tools. I have not tried the manual install process listed above by Rob yet.
Describe the bug When trying to install Supabase using npm on a MacBook Pro with an M2 chip, the build process fails and exits with code 1.
The error message states that Supabase is having a ECONNRESET. Additionally, during the installation process, the entire network connection on the laptop becomes unresponsive.
To Reproduce
I am using the NextJS with Supabase, but I have also tried the install from a fresh npm init directory. I have used 2 different computers (M2 and intel chip). I have fiber at my house with 500Mbps down. I have also tried tethered to my phone.
Steps to reproduce the behavior:
npm install supabasefrom the project rootExpected behavior Supabase should be installed and postinstalled successfully without causing the network connection to become unresponsive.
Desktop: OS: macOS (M2 chip) Version of CLI: Unable to install it. Version of Node.js (if applicable): [Please fill this in with your Node.js version] v18.17.0