-
Notifications
You must be signed in to change notification settings - Fork 911
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
Crash installing on M1 Mac using arm64 node #3129
Comments
Just try with the current version.
|
FYI: #3120 |
I can confirm this is a problem with m1 macs. You can't deploy firebase functions with any version of node. The firebase cli does not work for functions on m1 macs. I also received a message from firebase support indicating it is not a priority for them to fix, so good luck. |
I don't have immediate access to an M1. I'm going to try to get my hands on one and look into it. |
I'm not able to replicate this on a Mac Mini M1 running node v12.20 or v15.8, and firebase-tools v9.4.0. (and brew v2.7.3). I updated node using the I tried installing via
|
yes, the Firebase CLI won't run on M1 macs, but you can get around this problem by doing the following: add this code near the top of your function: process.env.GCLOUD_PROJECT = "pbusterapi" and then use gcloud to deploy as follows: gcloud functions deploy newCommFeedRecord it will attempt an init by guessing the creds directly from the project name |
The only problem is deploying functions. Try deploying 3 or 4 functions using this command: firebase deploy --only functions Let me know what happens using node 15.8 |
I haven't tried using node 12. I've been using node 14 & 15. |
No issues using node 15 and
|
@dgaedcke I've been using my windows machine to deploy my functions. I don't want to code around the cli issue. The best option is to fix what is wrong with the cli running on apple silicon. The dev kit for apple silicon has been out since last summer. If I were a firebase project lead I would have assigned qa testing for the cli on apple silicon months ago. Firebase is a product sold by google, so I would want to know my product worked correctly on something as major as apple silicon. |
Very interesting. You are the first to report that. Firebase support sent me a message indicating they knew it was a documented issue. It might be helpful if they knew what was different in your setup. Do you have the gcloud tools installed? |
Not currently. I'll try that next. Could it have to do with homebrew? I changed node versions with the |
I don't think so. Fortunately I have a windows machine I can use since I build windows desktop apps for some of my clients. |
Have you tried on the latest firebase-tools version? |
I think I've narrowed this down to node being installed via nvm (built locally, rather than downloading binaries). When installing node via
When installing node via
Deployment error. Build failed: Build error details not available. |
Interesting. Where did you get your darwin/arm64 node binaries from? |
Have the same issue. Will it help to switch to n or volta? |
I don't know. There are multiple issues related to m1.
It's just a rough road right now. Kiana says she has not had the same problems but everyone I have talked to has. I'm wondering if she installed node while using the terminal running under rosetta. I tried that and the intel binaries for node get installed that way, but you don't get the benefit of arm64 while using node. |
Just tried Volta with node 14 LTS. It uses Rosetta 2 under the hood to run node. And it solves the issue with the Firebase cli. Just deployed my functions 🙃 |
That makes sense. If I didn't have my windows machine to deploy my functions I would probably have to run node under rosetta too. |
Ah, that's an excellent insight @donhmorris. The |
@donhmorris Thanks for your patience here. IIUC -
Did I get this right? If so, can you share the error you are seeing when trying to deploy functions using node 15? Preferably on #3120. |
@taeold yes, that is correct. Node 15+ built by nvm using source. |
Added the cloud build logs to #3120 |
I'm using node 12 on mac m1 and have the same trouble.
Is there any solution without install node 15v or using volta? |
Any updates on this? |
For the pre-node 15 questions, it does seem to be a problem with node itself, and it's generally fixed by running on the x86 / rosetta version - check out https://github.com/nvm-sh/nvm/blob/master/README.md#troubleshooting-on-macos For the error where most of the CLI works, but functions deploys don't (due to the uploaded archive not being able to be uncompressed), check out #3120 for updates. |
Same issue here. Any update? |
I haven't had any issues after installing node 16, which contains a binary version for arm64 |
me 2 |
same for me, any updates on this? |
TL;DR - Please check your node version and upgrade to >15.3.0 (relevant stackoverflow). |
Works with node 15. Thank you @taeold |
[REQUIRED] Environment info
I've reinstalled Firebase with:
curl -sL firebase.tools | upgrade=true bash
and firebase --version
yields: Abort trap: 6 (partial log below)
Running M1 Mac 11.2
Node12 installed with Homebrew ARM64
~$ brew --version
Homebrew 3.0.0
Homebrew/homebrew-core (git revision 7eaf2; last commit 2021-02-09)
Homebrew/homebrew-cask (git revision c2081; last commit 2021-02-10)
[REQUIRED] Test case
Try it yourself on an M1 mac
[REQUIRED] Steps to reproduce
Try it yourself on an M1 mac
[REQUIRED] Expected behavior
Installs and runs
[REQUIRED] Actual behavior
The text was updated successfully, but these errors were encountered: