Skip to content

INVALID_PLUGIN_IMPORT on EAS build #1915

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

Open
gpawlik opened this issue May 5, 2025 · 5 comments
Open

INVALID_PLUGIN_IMPORT on EAS build #1915

gpawlik opened this issue May 5, 2025 · 5 comments

Comments

@gpawlik
Copy link

gpawlik commented May 5, 2025

Describe the bug
I get this error when creating a build via Expo EAS. I am on the newest version of Expo (53.0.7) and @stripe/stripe-react-native (0.45.0). I have installed the library as indicated in the docs https://github.com/stripe/stripe-react-native?tab=readme-ov-file#expo

 PluginError: Package "@stripe/stripe-react-native" does not contain a valid
    config plugin.
    Learn more: https://docs.expo.dev/guides/config-plugins/#creating-a-plugin

    Cannot use import statement outside a module
    Code: INVALID_PLUGIN_IMPORT
@victoriamcn
Copy link

I'm having this same issue. We upgraded React Native/Expo to the newest versions and now Stripe is broken.

Dev Build Error

Package "@stripe/stripe-react-native" does not contain a valid config plugin.
Learn more: https://docs.expo.dev/guides/config-plugins/#creating-a-plugin

Unexpected token 'typeof'
    Error: build command failed.

Here's our set up:

Dependencies in package.json:

    "expo": "53.0.7",
    "react": "19.0.0",
    "react-native": "0.79.2",
    "@stripe/stripe-react-native": "^0.45.0",

App Config:

      [
        '@stripe/stripe-react-native',
        {
          urlScheme: '<my-app>://',
          merchantIdentifier: 'merchant.com.<my-app>',
          enableGooglePay: false,
        },
      ],

App.js Stripe Wrapper

<StripeProvider
      publishableKey={<PK>}
      merchantIdentifier="merchant.com.<my-app>"
      urlScheme="<my-app>://"
>

/* ... code... */

</StripeProvider>

@janicduplessis
Copy link
Collaborator

Hello, I could use some more information to debug further:

  • This happens when building for which platform?
  • What version of node are you using?
  • Does this happens only on EAS or can you reproduce the issue locally too?

@tm00-git
Copy link

tm00-git commented May 21, 2025

same issue

Image

@JackBDart
Copy link

Bump!

@johanndms
Copy link

Bump as well :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants