Error while initialising prismic-ts-codegen

I'm setting up Prismic in SvelteKit - I am attempting to use prismic-ts-codegen - I have followed the docs and get as far as running npx prismic-ts-codegen init but run into the following error:

         
file:///***/node_modules/prismic-ts-codegen/dist/cli/loadLocaleIDs.js:2
import { createClient } from './../_node_modules/@prismicio/client/dist/createClient.js';
         ^^^^^^^^^^^^
SyntaxError: Named export 'createClient' not found. The requested module './../_node_modules/@prismicio/client/dist/createClient.js' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from './../_node_modules/@prismicio/client/dist/createClient.js';
const { createClient } = pkg;

    at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:190:5)

Node.js v18.16.1

I've checked my node version etc but can't seem to move past this error.

Any help would be appreciated.

We have the same new problem. It look coming from prismic package. We use nextjs

We don't find any solution till know. Any one else have the same issue ?

Same problem here, just downgrade to "prismic-ts-codegen": "0.1.11",

Thank you for your experience return. It's not working for as when we downgrade to "prismic-ts-codegen": "0.1.11". Hope, there is a solution for it soon.

we use this version since june 1st, so I can assure you this one is OK. There are different errors starting from the 0.1.12
What is your error ?

This is my error :
import { createClient } from './../_node_modules/@prismicio/client/dist/createClient.js';
^^^^^^^^^^^^
SyntaxError: Named export 'createClient' not found. The requested module './../_node_modules/@prismicio/client/dist/createClient.js' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from './../_node_modules/@prismicio/client/dist/createClient.js';
const { createClient } = pkg;

at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:190:5)

yeah I can reproduce this error with version 0.1.15, but not with 0.1.11. maybe remove your node_modules directory to be sure you use the right version ?

For now, we will wait for a fix for next versions. We will use slice machine web application to generate types