Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

production build not possible with visualEditing enabled because of missing react/jsx-runtime dep #1050

Open
podlebar opened this issue Aug 30, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@podlebar
Copy link

podlebar commented Aug 30, 2024

Version

module: "@nuxtjs/sanity": "^1.12.1"
nuxt: ^3.13.0,

Nuxt configuration

  sanity: {
    projectId: process.env.SANITY_PROJECT_ID,
    dataset: "production",
    useCdn: true,
    apiVersion: "2024-06-25",
    visualEditing: {
      token: process.env.SANITY_READ_TOKEN,
      studioUrl: "http://localhost:3333",
    },
  },

Reproduction

Link:
will follow soon

What is expected?

yarn build builds without errors.

What is actually happening?

the build fails with following message:

[12:48:23 PM] ERROR Nuxt Build Error: [vite]: Rollup failed to resolve import "react/jsx-runtime" from "/Users/bart/Documents/viu-web/node_modules/@sanity/visual-editing/dist/_chunks-es/renderVisualEditing.js". This is most likely unintended because it can break your application at runtime. If you do want to externalize this module explicitly add it to build.rollupOptions.external

Steps to reproduce

Run: yarn build

Additional information

i assume it happens from this: 13737c5

Checklist

  • [ x] I have tested with the latest Nuxt version and the issue still occurs
  • [ x] I have tested with the latest module version and the issue still occurs
  • [ x] I have searched the issue tracker and this issue hasn't been reported yet

What is expected?

nuxt build gets build without error above.

What is actually happening?

Bildschirmfoto 2024-08-30 um 13 03 09
@podlebar podlebar added the bug Something isn't working label Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants