Multiple versions of @sanity/generate-help-url from block-content-to-hyperscript
This is a dependency conflict issue that's actually not a problem with your code, but rather with an outdated transitive dependency. Here's what's happening:
The @sanity/block-content-to-hyperscript package is deprecated and has been replaced by modern alternatives. Even though you're not directly using it in your project, some older Sanity package might still have it as a dependency, which is causing the version conflict with @sanity/generate-help-url.
Solution
The best approach is to migrate away from the deprecated packages. According to the official Sanity documentation, here are the modern replacements:
For rendering Portable Text:
For HTML: Use
@portabletext/to-htmlinstead of@sanity/block-content-to-htmlor@sanity/block-content-to-hyperscriptFor React: Use
@portabletext/reactinstead of@sanity/block-content-to-reactFor other frameworks: There are modern packages for Vue, Svelte, React Native, and Astro
Immediate workarounds:
If you can't migrate immediately, try these:
- Use npm resolutions (in package.json):
{
"resolutions": {
"@sanity/generate-help-url": "^3.0.0"
}
}Use yarn resolutions or npm overrides to force a single version
Clear your lock file and reinstall:
rm -rf node_modules package-lock.json
npm installLong-term fix:
Check which Sanity packages you're using and update them to their latest versions. The core Sanity packages have been updated to remove dependencies on these deprecated packages. Run:
npm outdatedThen update your Sanity packages:
npm update @sanity/client sanityThe block-content-to-hyperscript package is no longer maintained by Sanity, so this isn't something that will be "fixed in the core Sanity package" - it's been replaced by the modern Portable Text tooling mentioned above.
Show original thread25 replies
Sanity – Build the way you think, not the way your CMS thinks
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.