Skip to content

SyntaxError: Cannot use import statement outside a module #52

Closed Answered by AdaltonLeite
felipemendez98 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @joaogabriels,

I thing that to render the Mercado Pago - React SDK we need to import it with Dynamic Import from NextJs, this enable the code to be ignored by the Server Side and only run on the Client Side.

Here is an example Wiki of a where it is possible to render the React SDK in NextJS, using the method getPaymentMethods

Replies: 2 comments 10 replies

Comment options

You must be logged in to vote
9 replies
@joaogabriels
Comment options

@francineemilia
Comment options

@joaogabriels
Comment options

@AdaltonLeite
Comment options

Answer selected by icaldana
@bubamacko
Comment options

@AdaltonLeite
Comment options

@bubamacko
Comment options

Comment options

You must be logged in to vote
1 reply
@ignaciolarranaga
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
help wanted Extra attention is needed
7 participants