Closed developer-bart closed 4 years ago
Hi Bart,
Are you using @mollie/api-client
inside your Gatsby/React-app?
HI @Pimm,
Yes I am
Thank you for the response.
Although this version of the library is written in JavaScript, it is still designed to run on a server (in Node.js to be specific).
This is not a shortcoming: it is by design. You will have to set up a Node.js server which runs this library, or alternatively run a PHP, Ruby, or Python server.
See this issue for more information.
I see now that this is not obvious. We should be more vocal about this. Thank you for bringing this to my attention.
@Pimm Thanks for your quick response. I thought the payment needed to be created on the client side. Thanks again!
Hi,
I'm using a Gatsby/React setup. I've added the
@mollie/api-client
package to my project and added the following code on the client side:I now get the following error:
This dependency was not found:
* fs in ./node_modules/@mollie/api-client/dist/mollie.esm.js
Any clue what this is and how I can fix it? I tried adding
fs
both to my project and to the@mollie/api-client
inside the node_modules folder.