window.prismic.Toolbar is undefined in nextjs - toolbar in preview mode not showing

I have a nextjs project repo id jenzabar-next. I have set up preview mode in an identical way to my other prismic projects which work. Yet window.prismic.Toolbar is undefined in jenzabar-next. The preview does work when clicking the eye icon but the toolbar is not available.

using packages "@prismicio/client": "^5.1.0" in dependencies and "prismic-cli": "^3.8.13" in devDependencies

I initially thought it was this issue but I think it is something else

I copied the prismic script exactly from the preview settings page

<script async defer src="https://static.cdn.prismic.io/prismic.js?new=true&repo=jenzabar-next"></script>


Hey there, thanks for reaching out.
Is your script added in the <head> of your pages?

We're investigating if there's an additional reason why this could be happening. We'll let you know when we have more information.

Thanks

Hi @Pau yes the script is in the head. window.prismic is defined and looks fine. As is "window.prismicToolbar" but not window.prismic.Toolbar like on other projects. It's very confusing!

window.prismicToolbar is a legacy version of the toolbar. To update it, you need to include the newest script in all your other projects.

I've opened a ticket in the dev teams backlog. As soon as I have news about this being reviewed, we'll let you know

@Pau Thank you. Just to be clear, I am using the latest script in all my projects, including the one with the issue. The other projects have both window.prismicToolbar and window.prismic.Toolbar.

Ok, thanks for letting us know.

This thread is being monitored as an open ticket in the internal Prismic issue tracker. The Prismic support team will update this post as we get more information from our dev team. If you have a similar use-case, you can ‘Flag’ this topic to reopen and add it here.