Hi folks, I am trying to build a react native project and I am using bun as the package manager, but I am getting the following error message:
📦 Installing [1662/1951] dyld[46253]: Symbol not found: __ZNK6icu_746number23NumberFormatterSettingsINS0_24LocalizedNumberFormatterEE10toSkeletonER10UErrorCode
Referenced from: <2012A65E-5EB9-311D-80C8-99FD31D3890D> /nix/store/9vkabbbbyfn8hv5l1r8fm59d27imq460-nodejs-22.11.0/bin/node
Expected in: <59FD1226-789A-3063-B6B6-2E92BEEA57E8> /nix/store/3v1icdy3q210szf1ccwvxngskixn2p0d-ICU-74221/lib/libicui18n.74.2.dylib
error: postinstall script from "esbuild" terminated by SIGABRT (Abort)
[1] 46249 abort bun install
Setup:
- MacOS Sequoia Version 15.2 (24C101)
- I have the following packages installed:
- bun
- nodejs_22
Here’s a simple package.json that can help reproduce the error:
{
"name": "bun-demo",
"version": "1.0.0",
"private": true,
"dependencies": {
"esbuild": "0.24.2"
},
"trustedDependencies": [
"esbuild"
]
}
bun install
should give you the error.
I tried this on a CentOS 9 box and things work fine so I guess it is a MacOS specific issue.
I have tried various things like trying to include icu76 by following this and this, but it is still using a different icu.
This also seems to be related to bun: fix darwin build and runtime issues by sandydoo · Pull Request #358195 · NixOS/nixpkgs · GitHub. It is forcing nix to use darwin.ICU
which is at version 74221
.
I am very new to all this and I tried a few different approaches and had no luck. Any tips would be appreciated.