algolia / react-instantsearch

⚡️ Lightning-fast search for React and React Native applications, by Algolia.
https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/react/
MIT License
1.97k stars 386 forks source link

ERROR - Recent changes in instantsearch.js do break getServerState #3623

Closed DB-Alex closed 1 year ago

DB-Alex commented 1 year ago

@Haroenv Your recent commit breaks the server hooks plugin:

https://github.com/algolia/instantsearch.js/commit/231853dab731189a33ee480cdb196789c7336fda#diff-e78e1b9a02a935bbc87df77904b2f68b97e32d459a1ad8710f4fab1386375d61

error: file:///node_modules/react-instantsearch-hooks-server/dist/es/getServerState.js:7
import { isIndexWidget } from "instantsearch.js/es/widgets/index/index.js";

SyntaxError: The requested module 'instantsearch.js/es/widgets/index/index.js' does not provide an export named 'isIndexWidget'

Versions:

"react-instantsearch-hooks-server": "^6.32.1",
"react-instantsearch-hooks-web": "^6.32.1",

I submitted a pullrequest here:

https://github.com/algolia/react-instantsearch/pull/3624

Haroenv commented 1 year ago

Thanks for noticing this, I didn't know React InstantSearch Hooks was importing from private paths :( I've incorporated the fix in https://github.com/algolia/react-instantsearch/pull/3622, as the new path only works from that version of InstantSearch.js too

DB-Alex commented 1 year ago

Thanks for the quick fix!

Haroenv commented 1 year ago

The fix is released in 6.33.0, thanks for listing a suggested fix too!