-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
Encountering a tonne of issues with Nuxt and Sanity visual editing. Have opened this issue in the Nuxt module repo, but thought it might be worthwhile putting here as well in case the Sanity team have any suggestions.
Version
@nuxtjs/sanity module: 1.13.3
nuxt: 3.15.4
Nuxt configuration
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
devtools: { enabled: false },
future: {
compatibilityVersion: 4,
},
modules: ["@nuxtjs/sanity"],
sanity: {
apiVersion: "2025-02-13",
projectId: "3jds3t8i",
dataset: "production",
visualEditing: {
studioUrl: "http://localhost:3333",
token: "",
},
},
compatibilityDate: "2025-02-13",
});
Reproduction
Minimal reproduction:
https://github.com/MichaelPrecel/Nuxt-Sanity-Visual-Editing-issue-reproduction/tree/main
What is actually happening?
Visual editing is unable to connect. Receiving error
Uncaught (in promise) SyntaxError: The requested module '/_nuxt/@fs/Users/michaelprecel/Sites/EACH/each-minimal-repro/Nuxt-Sanity-Visual-Editing-issue-reproduction/nuxt-repro/node_modules/.pnpm/[email protected]/node_modules/shallowequal/index.js?v=ef34c05a' does not provide an export named 'default' (at styled-components.browser.esm.js?v=ef34c05a:4:8)
Steps to reproduce
- Pnpm install both
nuxt-reproandsanity-repro - Run pnpm dev on both nuxt and sanity folders
- In Sanity, enter Presentation mode
- Open browser console to see issue
Additional information
Checklist
- I have tested with the latest Nuxt version and the issue still occurs
- I have tested with the latest module version and the issue still occurs
- I have searched the issue tracker and this issue hasn't been reported yet
Package.json
{
"name": "nuxt-app",
"private": true,
"type": "module",
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "nuxt generate",
"preview": "nuxt preview",
"postinstall": "nuxt prepare"
},
"dependencies": {
"@nuxtjs/sanity": "1.13.3",
"@sanity/client": "^6.28.0",
"nuxt": "^3.15.4",
"react": "18",
"vue": "latest",
"vue-router": "latest"
}
}
rylanharper, Olahben and tlebeitsuk
Metadata
Metadata
Assignees
Labels
No labels
