Closed binajmen closed 2 years ago
This library doesn't rely on any polyfills and only depends on axios, which NPM (or Yarn) will automatically install for you.
The current version runs on Node.js 6.14.×, which has url
available.
Edit: The underlying issue you're having, is that you're importing this library clientside. Frameworks such as Next.js and Remix blur the lines between clientside and serverside. It's an interesting development. However, when it comes to payments ‒ a very security-sensitive subject ‒ it is crucial that some of the logic is strictly serverside.
Specifically, it is important that your API key is never shipped to users. With this key, users will be able to act on your behalf (e.g. view the data of your customers, or create refunds). So please learn how to keep your API keys safely on your server in your framework of choice.
This library doesn't rely on any polyfills and only depends on axios, which NPM (or Yarn) will automatically install for you.
The current version runs on Node.js 6.14.×, which has
url
available.
Yes it was totally my fault ;)
No problem! I'm also commenting for the person who stumbles upon this issue.
Hey there! I'm running into the same issue (using node 14.17.3). Mind sharing how you solved it @binajmen ? Thanks.
Hey there! I'm running into the same issue (using node 14.17.3). Mind sharing how you solved it @binajmen ? Thanks.
Hi @dodas, this problem was specific to how Remix works. If you're using Remix, you have to add the suffix .server.ts
to keep things at server side.
Yes, I am using Remix. I managed to fix it in a similar manner – the package being bundled into frontend code was the problem.
Thanks for commenting. Chances are that you're helping out the next person who finds themself in the same situation.
I'm updating my first answer to be a little more helpful.
Hi,
I'm using Remix (https://remix.run) with Mollie. I have this error while building my app.
Not sure to understand where the error come from. Are you relying on polyfills I should add to my dependencies?
Your help would be greatly appreciated 🙏
UPDATE: my bad ;)