#View Transitions working on build time but not on dev mode

4 messages · Page 1 of 1 (latest)

humble gust
#

I'm not able to make View Transitions work on dev mode, but when I build it, it works perfectly fine.

I've got this console log error when I'm in dev mode: Uncaught ReferenceError: EXPERIMENTAL_CLIENT_PRERENDER is not defined at index.js?v=d51dac87:7:23.

I've tried everything I can to solve this but I'm not able to solve it by myself.

This is what I tried doing:

  • Used different node and npm versions.
  • Cloned a repository that uses View Transitions perfectly and throws the same error on dev mode.
  • Created a brand-new Astro project to isolate the problem.
  • Deleted node_modules and package-lock files, reinstalled dependencies with npm install.
  • Disabled browser extensions and tested on different browsers.
  • Inspected build logs and successful deployments on Netlify to determine compatible Node.js versions.

You can checkout my repository for more context:
https://github.com/jcrrodriguez/Test

This is the netlify page:
https://master--effervescent-meringue-1a278e.netlify.app/

GitHub

Contribute to jcrrodriguez/Test development by creating an account on GitHub.

humble gust
#

Anyone?

quasi thunder
#

Hi @humble gust, I am sorry that this is not working smoothly. Unfortunately, I was not able to reproduce the error with the specified repo. It works fine for me when I build it on GitHub Codespaces and try it with Chrome.

I don't know if this will help you, but you could try turning off prefetching: https://docs.astro.build/de/guides/prefetch/#using-with-view-transitions

humble gust
#

Hello @quasi thunder, I could also notice that devTools weren't working as well, so I read this PR from someone that had that same problem: https://github.com/withastro/astro/issues/9389

I fixed it by uninstalling the node_modules and installed a specific Astro version (4.0.7) which was the one in were the PR was merged and fixed:
https://github.com/withastro/astro/pull/9457

Thank you for ur help!

GitHub

Astro Info Astro v4.0.3 Node v20.10.0 System Windows (x64) Package Manager pnpm Output static Adapter none Integrations unocss @astrojs/markdoc @astrojs/sitemap @sentry/astro @spotlightjs/astro If ...

GitHub

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not read...