Stripe with Remix 2.0

I'm using Stripe with Remix on CF Pages, using this configuration:
`
export const stripe = (stripe_key) =>
    new Stripe(stripe_key, {
        apiVersion: '2023-08-16',
        typescript: true,
        httpClient: Stripe.createFetchHttpClient(),
    })
`
I've tried many ways but I always get this error:
    node_modules/object-inspect/util.inspect.js:1:25:
      1 │ module.exports = require('util').inspect;
        ╵                          ~~~~~~

  The package "util" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.

Is this related with ESM config in Remix 2.0. ? I thught Stripe was totally compatible with Workers...
Was this page helpful?