Error: Expected the PUBLIC_KEY to render the MercadoPago SDK React #349
-
|
Nevertheless, I get 201 from MercadoPago's API, and I can use “init_point” to pay via MercadoPago's website. I already tried running “initMercadoPago” in the payment's and root's page files, but I'm still getting such error when the “Wallet” component should be rendered. Packages version: Any ideas? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
Hi! Sorry, but from your description I cannot understand the problem you are facing. Thanks! |
Beta Was this translation helpful? Give feedback.
-
|
Hi! I ran into the same issue today and managed to resolve it. Packages version: It turns out the problem is related to how environment variables are handled in Next.js. In this case, you need to use variables that are prefixed with NEXT_PUBLIC_ to make them accessible on the client side. I changed this line:
To this:
Note: I'm using typescript as well so I needed to add |
Beta Was this translation helpful? Give feedback.
-
|
I can see from the tox.ini that pytest is installed via However, I notice the setup uses To reproduce and validate the issue, we'd need:
Without seeing the actual error output, it's hard to confirm if this is a bug or a configuration issue. Could you share the exact warning text and which command triggers it? That would help determine if pytest is being resolved from outside the tox env (which would be a bug) or if there's a different issue at play. |
Beta Was this translation helpful? Give feedback.
Hi!
Sorry, but from your description I cannot understand the problem you are facing.
If your problem is with the React SDK, please open a question, showing your implementation in detail, on the discussion page for the aforementioned SDK.
Github page link.
Thanks!