Prismic-javascript / @prismicio/client version 4 unavailable

Reading your documentation on doing previews for Next.js, you make specific reference to needing 4.0.0 of the @prismicio/client.

Make sure that you are using the latest @prismicio/client v.4.0.0 kit or above.

This is doubly confusing because it would appear you have deprecated the @prismicio/client package or renamed it on NPM/Github to prismic-javascript. And then if you use Yarn/NPM to pull in prismic-javascript, you haven't updated the package registry to use anything above v3.0.2 so it isn't possible.

Perhaps this is intentional because v4 of primsic-javascript looks to have jumped up to TS and that may cause some issues?

In the meantime, I have gotten v4 to work by manually adding the package into my Next repo in /api/prismic. But, if you're project is running as a JS project, you will have to make sure you set Next up for TS support. That's pretty easy - just follow their instructions.

Hi @john1,

Thanks for posting this. I'm not sure I understand what you're describing.

The current kit for doing API queries is @prismicio/client. The package was formerly called prismic-javascript, but the name was changed recently.

@prismicio/client v4.0.0 is available here on NPM:

You can install it via npm and Yarn:

# npm
npm i @prismicio/client

# Yarn
yarn add @prismicio/client

The package is still called prismic-javascript on GitHub.

Are you seeing references to prismic-javascript in any of our examples, themes, or documentation? We changed all of the references last month, but it's possible that we missed some.