"requires WebGI to be loaded" error
Correct the script order when the Mini Viewer stops with a WebGI load error.
Symptom
The viewer does not start. The browser console shows an error with this text:
requires WebGI to be loaded before this packageCause
Your page uses the Mini Viewer bundle without WebGi, bundle.nowebgi.iife.js. This bundle expects that WebGi is on the page already. The WebGi script is absent, or it comes after the viewer script.
Fix
Find the script tags for WebGi and for the Mini Viewer in your page.
Put the WebGi script before the Mini Viewer script.
html<script src="https://releases.ijewel3d.com/libs/webgi-v0/bundle-<version>.js"></script> <script src="https://releases.ijewel3d.com/libs/mini-viewer/<version>/bundle.nowebgi.iife.js"></script>Replace each
<version>with a current release. See the Viewer introduction.As an alternative, change the file name in the viewer script to
bundle.iife.js. This bundle includes WebGi.In Next.js, load the WebGi script in the root layout with
strategy="beforeInteractive".Reload the page. Then look at the console again.
All 6 steps are done.
A licence key is not the cause
This error is about the script order only. WebGi checks the domain automatically and needs no licence key.
If the problem continues
Contact support. Send the page address and the full text of the console error.