Typescript error regarding prismicio/client after switching module resolution in typescript

Hello I have run recently into a issue where when i switched my module resolution in my tsconfig from node to node16 that the file for the module declaration was not found. This is the error below

Could not find a declaration file for module '@prismicio/client'. '/Users/xxxx/Desktop/xxx/xxx-xxx-/node_modules/@prismicio/client/dist/index.cjs' implicitly has an 'any' type.
  If the '@prismicio/client' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module '@prismicio/client';

I am using the version 6.7.1 for prismicio/client same thing happense for the prismicio/types etc
This is how i import it
import * as prismic from '@prismicio/client';
And just a side note everything works perfectly fine the module resolution is set to just node instead of node16.

Hello @nihad.barucija,

Welcome to Prismic Community, and thanks for reaching out to us!

We saw the same issue on our end, and our team is currently looking into this.

And as an immediate fix, we recommend you use moduleResolution: "node" rather than node16 which you stated, but we are trying to fix it on our end, so node16 works and will get back to you when we have an update.


Hello @nihad.barucija,

I got feedback from our team on this issue. We do not currently support moduleResolution: "node16". We officially support moduleResolution: "node". But we are working to support it; we don't have an ETA right now, but we will keep you updated.


No problem thank you a lot for reaching out I really appreciate it!

1 Like

Hello, could'nt find anything about if this was resolved. Does it still only support "node" as of now?

Hi @erik.albinsson, yes, moduleResolution: "node" is still the only officially supported mode.