Hi all I upgraded my blog from astro 3 to astro 4 and when I did that sanity and other plugins were not working once fixing everything for my local development environment. I deployed the changes and everything is working except for sanity studio these are the errors from the console not sure how to fix as it is working locally and only breaks when deploying through netlify. if anyone has any information that can help that would be greatly appreciated
#Sanity Studio Not working with deployed version of site
4 messages · Page 1 of 1 (latest)
Hi @silver token. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
Based on the information provided in the extracts, there are a few potential issues that could be causing your problem with Sanity Studio in your deployed Astro application.
-
Isomorphic Packages: There's a reported issue with isomorphic packages like
@sanity/clientcausing errors when used with Astro. The errorwindow is not definedsuggests that Astro is trying to execute code that is bundled for the browser by Snowpack, which can cause issues with isomorphic packages (source (https://github.com/withastro/astro/issues/459)). -
Adapter Configuration: There are several reported issues with deploying Astro applications using different adapters. Make sure your adapter is correctly configured for your deployment environment. For example, one user reported an issue with the Netlify adapter causing their application to crash after deployment (source (https://github.com/withastro/astro/issues/7638)).
-
Node Version: Another user reported that removing
type: modulefrom theirpackage.jsonfile resolved a deployment issue they were experiencing. This was specifically related to using Node v16+ (source (https://github.com/withastro/astro/issues/7638)).
Without more specific information about your setup and the errors you're encountering, it's difficult to provide a more precise answer. I would recommend checking your adapter configuration and the version of Node you're using for deployment. If you're using isomorphic packages like @sanity/client, you may need to find a workaround for the issues described above.