algolia / instantsearch

⚑️ Libraries for building performant and instant search and recommend experiences with Algolia. Compatible with JavaScript, TypeScript, React and Vue.

Home Page:https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Uncaught ReferenceError: module is not defined" with the latest 4.56.6 version

byoan opened this issue Β· comments

πŸ› Current behavior

Hello,

After the release of the new 4.56.6 version of instantsearch.js, I'm seeing the following error in the console, preventing the search from working:

Screenshot 2023-07-19 at 10 19 03

Reverting back to 4.56.5 fixes the issue.

πŸ” Steps to reproduce

Use the instantsearch.js@4.56.6 script for a search
Open the browser console
The Uncaught ReferenceError: module is not defined error appears, which leads to instantsearch is not a function when attempting to use it for the search script.

Live reproduction

https://codesandbox.io/s/ecstatic-payne-clrkwf

πŸ’­ Expected behavior

The reported error shouldn't occur, which would make "instantsearch" available and let the page work.
The Codesandbox scripts clear the first module error, and only let the instantsearch is not a function error appear, so you might need to create a custom HTML page to see the error as well.

Package version

instantsearch.js@4.56.6

Operating system

No response

Browser

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Hi, thanks for your report. We've identified the cause of the issue and we'll release a fixed version shortly. In the meantime you can pin your InstantSearch script to the previous working version:

<script src="https://cdn.jsdelivr.net/npm/instantsearch.js@4.56.5"></script>

Thanks for the quick fix πŸ‘

4.56.7 is released with the UMD being correct now