Skip to content
DevelopersTroubleshooting

"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:

text
requires WebGI to be loaded before this package

Cause ​

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 ​

Step 1 of 6
  1. Find the script tags for WebGi and for the Mini Viewer in your page.

  2. 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>
  3. Replace each <version> with a current release. See the Viewer introduction.

  4. As an alternative, change the file name in the viewer script to bundle.iife.js. This bundle includes WebGi.

  5. In Next.js, load the WebGi script in the root layout with strategy="beforeInteractive".

  6. Reload the page. Then look at the console again.

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.