Skip to content

Gotchas, Tips, and Tricks

Edward Silverton edited this page Nov 7, 2021 · 13 revisions

Use npm link to test components

Cd into Av component folder

cd ./iiif-av-component

npm link

npm run build

cd ../universalviewer

npm link @iiif/iiif-av-component

Cannot read properties of undefined (reading 'substr')

If you're getting an error saying Cannot read properties of undefined (reading 'substr') at normaliseUrl , it could be that your info.jsons aren't available over the network.

Ruby on Rails

Use this Gem to add the UV to your Rails project: https://github.com/pulibrary/pul_uv_rails

For cache invalidation outside of the Rail's asset pipeline, you can symlink a checksum of the UV source. https://github.com/sul-dlss/sul-embed/pull/860