Skip to content

PluginError: Unable to resolve a valid config plugin for llama.rn. #243

@will-lamerton

Description

@will-lamerton

Hey,

I'm trying to get my repo running with Llama.rn on iOS and Android with Expo. However, I cannot get past this when trying to build using any combo of build (npm ios, pnpm ios, npx expo run:ios, pnpx expo run:ios - same with Android equivalent commands.

Error:

PluginError: Unable to resolve a valid config plugin for llama.rn.
• main export of llama.rn does not appear to be a config plugin: the following error was thrown when importing ../node_modules/.pnpm/llama.rn@0.8.0_react-native@0.81.5_@babel+core@7.28.4_@types+react@19.1.16_react@19.1.0__react@19.1.0/node_modules/llama.rn/app.plugin.js: require() of ES Module ../node_modules/.pnpm/llama.rn@0.8.0_react-native@0.81.5_@babel+core@7.28.4_@types+react@19.1.16_react@19.1.0__react@19.1.0/node_modules/llama.rn/lib/module/expo-plugin/withLlamaRN.js from ../node_modules/.pnpm/llama.rn@0.8.0_react-native@0.81.5_@babel+core@7.28.4_@types+react@19.1.16_react@19.1.0__react@19.1.0/node_modules/llama.rn/app.plugin.js not supported.
Instead change the require of withLlamaRN.js in ../node_modules/.pnpm/llama.rn@0.8.0_react-native@0.81.5_@babel+core@7.28.4_@types+react@19.1.16_react@19.1.0__react@19.1.0/node_modules/llama.rn/app.plugin.js to a dynamic import() which is available in all CommonJS modules. ERR_REQUIRE_ESM
Verify that llama.rn includes a config plugin. If it does not, then remove the entry from plugins in your app config file. Learn more: https://docs.expo.dev/guides/config-plugins/

^ Replaced repo destination with ../

This is the plugins snippet of my app.json:

"plugins": [
      "expo-router",
      [
        "expo-splash-screen",
        {
          "image": "./assets/images/splash-icon.png",
          "imageWidth": 200,
          "resizeMode": "contain",
          "backgroundColor": "#ffffff",
          "dark": {
            "image": "./assets/images/splash-icon-dark.png",
            "backgroundColor": "#000000"
          }
        }
      ],
      "expo-font",
      [
        "llama.rn",
        {
          "enableEntitlements": true,
          "entitlementsProfile": "production",
          "forceCxx20": true,
          "enableOpenCL": true
        }
      ],
      "expo-web-browser"
    ],

Any guidance or thoughts on how to overcome this would be great. I'm using MacOS 26.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions