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

[bug] defineLive missing in v9.8.16 #1949

Open
daydream05 opened this issue Nov 20, 2024 · 1 comment
Open

[bug] defineLive missing in v9.8.16 #1949

daydream05 opened this issue Nov 20, 2024 · 1 comment

Comments

@daydream05
Copy link

[bug] defineLive missing in v9.8.16

Describe the bug
The defineLive function appears to be missing from next-sanity package version 9.8.16, causing TypeScript compilation errors when trying to implement live preview functionality.

To Reproduce

  1. Install [email protected]
  2. Try to import defineLive from 'next-sanity'
  3. Attempt to use it to set up live preview functionality
  4. Observe TypeScript error indicating the function is not found

Expected behavior
defineLive should be available as an import from 'next-sanity' to enable live preview functionality with proper type support.

Which versions of Sanity are you using?
@sanity/client: 9.8.16
next-sanity: 9.8.16

What operating system are you using?
[User should fill this in]

Which versions of Node.js / npm are you running?
[User should fill this in]

Additional context
This issue appears when trying to implement visual editing and live preview functionality following the Sanity documentation. The defineLive function is referenced in documentation but appears to be missing from the package exports.

Code that fails:

import { defineLive } from 'next-sanity' // Cannot find 'defineLive' in 'next-sanity'
@stipsan
Copy link
Member

stipsan commented Nov 26, 2024

Can you share a github repo where this is happening?

We're exporting defineLive from @sanity/next-loader, there could be something with the TypeScript configuration?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants