npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

expo-fmt-consteval-fix

v1.0.0

Published

Expo config plugin that fixes the fmt 11.0.2 "call to consteval function ... is not a constant expression" iOS build error on Xcode 26.4+ (Apple Clang 21) for React Native / Expo projects that build from source.

Readme

expo-fmt-consteval-fix

An Expo config plugin that fixes the fmt consteval iOS build error on Xcode 26.4+ (Apple Clang 21) for React Native / Expo projects that compile fmt from source.

If your previously healthy iOS build suddenly fails with something like this — and nothing in your own code changed — this plugin is for you:

❌  ios/Pods/fmt/include/fmt/format-inl.h:59
   call to consteval function
   'fmt::basic_format_string<char, ...>::basic_format_string<FMT_COMPILE_STRING, 0>'
   is not a constant expression

Why this happens

Xcode 26.4 ships Apple Clang 21, which enforces stricter C++20 consteval rules: a consteval call site must itself be a constant expression. The version of fmt bundled by React Native (11.0.2, used by RCT-Folly) relies on FMT_STRING(...) compile-time checks that no longer satisfy those rules, so the build fails — through no fault of your code.

The fix landed upstream by bumping fmt to 12.1.0, which only reached React Native ≥ 0.83.9 / 0.85.x (Expo SDK 56). It was not back-ported to the 0.81–0.83.2 line, so projects on Expo SDK 52–55 / React Native < 0.83.9 that build from source still hit it on Xcode 26.4+.

Who needs this

You're affected if all of the following are true:

  • React Native < 0.83.9 (Expo SDK 52–55), and
  • you compile native code with Xcode 26.4 or newer (locally, or on a CI image that uses it), and
  • fmt is compiled from source — e.g. expo-build-properties with ios.buildReactNativeFromSource: true, or any setup that doesn't use prebuilt React Native binaries.

Note on EAS Build: EAS pins a per-SDK image. As of writing, the sdk-54 image uses Xcode 26.0 and the sdk-55/latest image uses Xcode 26.2 — both below 26.4 — so EAS builds for those SDKs are typically unaffected. The error shows up first on local machines that have updated to Xcode 26.4/26.5, and on any image pinned to Xcode 26.4+. This plugin makes the build safe regardless of which Xcode compiles it.

Install

npm install --save-dev expo-fmt-consteval-fix
# or
yarn add -D expo-fmt-consteval-fix

Usage

Add it to the plugins array in your app.json / app.config.js / app.config.ts:

{
  "expo": {
    "plugins": ["expo-fmt-consteval-fix"]
  }
}

Then regenerate the native project and reinstall pods:

npx expo prebuild -p ios
# (or run pod install if you manage ios/ yourself)

Do a clean build afterwards (in Xcode: Product → Clean Build Folder) so stale derived data from the failed build doesn't mask the result.

No options to configure — adding it to plugins is all it takes.

How it works

During expo prebuild, the plugin injects a small snippet into your Podfile's existing post_install hook. On pod install, that snippet rewrites the vendored fmt/include/fmt/base.h to force:

- #  define FMT_USE_CONSTEVAL 1
+ #  define FMT_USE_CONSTEVAL 0

With consteval disabled, fmt validates format strings at runtime instead of compile time, which avoids Apple Clang 21's stricter rules. This is a build-time-only switch — the produced binary behaves identically, since fmt's internal format strings are fixed literals that are always correct. A build that compiles with this patch is behaviorally equivalent to one compiled on an older Xcode without it.

The patch is idempotent: after the first run there are no FMT_USE_CONSTEVAL 1 lines left, so it safely no-ops on every subsequent pod install, and it does nothing if fmt isn't present.

When to remove this

This is a transitional workaround, not a permanent dependency. Remove it once you upgrade to React Native ≥ 0.83.9 / Expo SDK 56 (which bundle fmt 12.1.0 and build cleanly on Xcode 26.4+):

  1. Remove "expo-fmt-consteval-fix" from your plugins array.
  2. npm uninstall expo-fmt-consteval-fix.
  3. npx expo prebuild -p ios --clean.

Compatibility

  • Expo SDK: 52–55 (React Native 0.76–0.83.2). Built and tested against SDK 54 (@expo/config-plugins 54.x).
  • @expo/config-plugins: >=7.0.0 (uses the long-stable withDangerousMod API).
  • Platforms: iOS only (no-op on Android).

References

License

MIT