Replit API does not load when using UNPKG

Problem description:
When I try to include the unpkg.com link into my extensions, this popped up:
Screenshot 2023-03-07 08.31.10

Expected behavior:
The error should not appear when I use the unpkg link.

Actual behavior:
The error popped up saying the API is not defined.

Steps to reproduce:

  1. Include the unpkg link in a <script> tag in index.html.
  2. Use any API functions.
  3. Error appears.
1 Like

Works fine for me. Make sure you load the API before loading your scripts.

2 Likes

I fixed it by loading an older version of the API, thanks for telling me though.

Edit: The latest version works now

3 Likes

I was having this issue too? Mind sharing what version works?

1 Like

Latest version should work now. It stopped working because Arnav was working on the lib at the moment and pushed some changes that broke the API.

1 Like

Version 0.17.1, using index.iife.js.

2 Likes

Yep. It works again.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.