benjamine / jsondiffpatch

Diff & patch JavaScript objects
MIT License
4.77k stars 464 forks source link

Packages on CDN are not working? #360

Closed nguyenlamlll closed 5 months ago

nguyenlamlll commented 7 months ago

Hi everyone, I'm following the section Visual Diff. I've created a standalone HTML file with the same codes. When I try to run, it does not render anything and it shows this error in the console log

build:jsondiffpatch@v0.6.0-3ZucslcM2zwGnqULgbGl:16 [Package Error] "jsondiffpatch@v0.6.0" could not be built. 
[1/5] Verifying package is valid…
[2/5] Installing dependencies from npm…
[3/5] Building package using esinstall…
Running esinstall...
Cannot find module 'jsondiffpatch/formatters/styles/annotated.css'

It seems that something is wrong on the CDN? If you visit the cdn links directly, you'll see the same errors as well (e.g., this link)

Methuselah96 commented 7 months ago

Thanks for raising the issue, I'm not sure what's going on there. As a workaround, you should be able to import it from esm.sh using the full file path (i.e. https://esm.sh/jsondiffpatch@0.6.0/lib/formatters/styles/html.css). I'll try to dig into why importing it from jsondiffpatch/formatters/styles/html.css isn't working.