Skip to content

Gotchas, Tips, and Tricks

Edward Silverton edited this page Oct 6, 2022 · 13 revisions

Use npm link to test components

cd ./iiif-av-component

npm link

npm i

npm run build

cd ../universalviewer

npm link @iiif/iiif-av-component

run npm run build:esmodule -- --watch in manifesto and manifold

don't run npm i in universalviewer after linking otherwise the links break.

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

Your log-in attempt did not appear to be successful. Please try again

If you're seeing this error message, you need to ensure that the server hosting your manifest has the correct CORS settings. It cannot use a wildcard (*) in the Access-Control-Allow-Origin CORS header - it must include the domain that is making the request. So if https://universalviewer.io is accessing https://myiiifmanifests.com, https://myiiifmanifests.com must include https://universalviewer.io in its Access-Control-Allow-Origin CORS response header.