Firebase 在 M1 Mac 上损坏 [英] Firebase broken on M1 Mac

查看:37
本文介绍了Firebase 在 M1 Mac 上损坏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一台新的 MacBook Air M1.Firebase 一直在工作,直到我上周将 firebase-tools 从 9.7.0 升级到 9.8.0.升级后,每次尝试运行任何firebase"时都会出现此错误.声明.

I have a new MacBook Air M1. Firebase had been working up until I did an upgrade of firebase-tools from 9.7.0 to 9.8.0 last week. After the upgrade, I get this error every time I try to run any "firebase " statement.

这个问题没有直接涉及的源代码,给关闭原问题的人.要重现此问题,您必须拥有 M1 mac 并使用 firebase.

There is no source code directly involved in this question, for the person who closed the original question. To replicate this issue you'd have to have an M1 mac and be using firebase.

我该如何解决这个问题?

How can I fix this problem?

(请注意遇到此问题的其他人,答案由@RandomDude 在下面的评论中提供:只需将 firebase-tools 降级到 9.7.0)

(Note for others who have this problem, the answer was provided in comments by @RandomDude below: just downgrade firebase-tools to 9.7.0)

steve@steves-air functions % firebase
dyld: lazy symbol binding failed: Symbol not found: __Z18sse42_is_availablev
  Referenced from: /opt/homebrew/lib/node_modules/firebase-tools/node_modules/sse4_crc32/build/Release/crc32c.node
  Expected in: flat namespace

dyld: Symbol not found: __Z18sse42_is_availablev
  Referenced from: /opt/homebrew/lib/node_modules/firebase-tools/node_modules/sse4_crc32/build/Release/crc32c.node
  Expected in: flat namespace

zsh: abort      firebase

推荐答案

2021 年 4 月 7 日更新

更新到 firebase-tools@9.9.0 解决了这个问题.

$ npm install -g firebase-tools
$ firebase --version
9.9.0


临时解决方案

正如 RandomDude 在上述评论中提到的,降级到 9.7.0它对我有用.


Temporal Solution

As it mentioned in the above comment by RandomDude, downgrading to 9.7.0 made it work for me.

$ firebase --version

# This will give you the same error.
# So, look at the directory where firebase-tools are installed.

$ cat /opt/homebrew/lib/node_modules/firebase-tools/package.json
{
  "name": "firebase-tools",
  "version": "9.8.0",
--- snip ---

重新安装 firebase-tools

Reinstall firebase-tools

$ npm uninstall -g firebase-tools
$ npm install -g firebase-tools@9.7.0
$ firebase --version
9.7.0

这对我来说是一个临时解决方案.感谢 RandomDude.

This is a temporal solution for me. Thanks to RandomDude.

这篇关于Firebase 在 M1 Mac 上损坏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆