Discussion of issues with @sanity/generate-help-url and @sanity/block-content-to-hyperscript in an older project
25 replies
Last updated: Sep 1, 2022
T
Hey everyone, I am having an issue after updating a bit of an older project. I am getting a multiple versions issue for @sanity/generate-help-url. The old version is being called from ./~/@sanity/block-content-to-hyperscript/~/@sanity/generate-help-url, however, I am not using block-content-to-hyperscript anywhere. Wondering if that needs to be updated in the core Sanity package?
Aug 31, 2022, 10:19 PM
T
@sanity/block-content-to-hyperscript
Aug 31, 2022, 10:25 PM
T
It looks like the dependencies are outdates in hyperscript
Aug 31, 2022, 10:24 PM
Hey
user K
! Can you try deleting your node_modules and lock file, then reinstalling?Aug 31, 2022, 10:25 PM
T
Hey RD, I have done that quite a few times before messaging here. I will give it another go though, this is what my dependencies are at š
Aug 31, 2022, 10:28 PM
T
Just deleting and reinstalling now
Aug 31, 2022, 10:29 PM
This may be unrelated since the issue seems to come from your hyperscript plugin, but I wonder if one issue is that block content to react is being deprecated in favor of this new plugin .
Aug 31, 2022, 10:34 PM
T
Ahh so true, ok thank you š I will update that plugin and see if it fixes it up š
Aug 31, 2022, 10:36 PM
T
user M
, I am running into this issue when trying to run portable-text Ecmascript modulesAug 31, 2022, 10:49 PM
T
Any idea where that would be coming from?
Aug 31, 2022, 10:50 PM
No, and I can't find any mention of that in the repo. I'll keep looking though!
Aug 31, 2022, 10:54 PM
T
Thank you, I have a feeling it's because this is a very old create react app running in JS not TS. It's a bit of a fragile one, but we are slowly making our way through an update.
Aug 31, 2022, 10:56 PM
T
I have simplified my setup and rolled back to the last commit where I updated all the @sanity libraries. But now getting an issue that I have had in the past couple of days with sanity-help-url
Aug 31, 2022, 11:05 PM
T
generateHelpUrl is not a function {"error":{"message":"generateHelpUrl is not a function","name":"TypeError","stack":"TypeError: generateHelpUrl is not a function\n at Object../node_modules/@sanity/client/lib/warnings.js
Aug 31, 2022, 11:05 PM
Ok, looking at this past issue , installing this package may fix it.
Aug 31, 2022, 11:15 PM
T
This is where it gets into a bit of a loop. If I add the latest package of generate help then block-to-hyperscript throws the multiple packages error with @sanity/block-content-to-hyperscript requiring a lower version of help url. I will give "resolutions" [] a try to see if I can resolve the versions.
We are about to start rebuilding the front end but just need to resolve this update so we can get a backlog bug fixed
š
We are about to start rebuilding the front end but just need to resolve this update so we can get a backlog bug fixed
š
Aug 31, 2022, 11:26 PM
T
"react": "^16.9.0",
Aug 31, 2022, 11:52 PM
T
Yeah it looks like the loop of block-content-to-react -> block-content-to-hyperscript -> @sanity/generate-help-url which requires ^0.140.0.
Is @sanity/block-content-to-hyperscript deprecated now as well as block-content-to-react
Is @sanity/block-content-to-hyperscript deprecated now as well as block-content-to-react
Aug 31, 2022, 11:57 PM
No, we're still recommending it.
Aug 31, 2022, 11:59 PM
T
user M
, I would be happy to, but need to be in a private channel as it's a clients repo.Sep 1, 2022, 12:03 AM
For sure! Feel free to DM me. My day is ending here, though, so I won't be able to take a look until tomorrow.
Sep 1, 2022, 12:54 AM
T
Hey
user M
, ok no worries at all š I have managed to bypass it temporarily by loosening the jest tests for now. I think with the amount of effort to resolve this, knowing there is a rebuild starting very shortly, we might just have to create a few workarounds for now šSep 1, 2022, 12:56 AM
T
But I will let you know how the testing goes and share the repo tomorrow if I still need. Thanks so much for your help today though
Sep 1, 2022, 12:56 AM
Sanityā build remarkable experiences at scale
Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.