algolia icon indicating copy to clipboard operation
algolia copied to clipboard

Is it safe to update from Nuxt3 to Nuxt4 with this module?

Open lucasdavidferrero opened this issue 5 months ago • 4 comments

Nuxt4 was just realeased. I'd like to update a client's project but I wonder if algolia module will break or not.

It is an important project that's in production already.

lucasdavidferrero avatar Jul 25 '25 12:07 lucasdavidferrero

Hey Buddy,

To be honest, there was no work on porting or migrating the module to Nuxt 4. I think the module should work but the best would be to actually test it on your specific project to make sure that it works correctly.

Maybe someone else have tried it already?

Baroshem avatar Jul 25 '25 13:07 Baroshem

I have tried and, although the module seems to work fine, it seems that a peer dependency (algoliasearch-helper) is breaking it: https://github.com/nuxt-modules/algolia/issues/232

kecoma1 avatar Sep 04 '25 12:09 kecoma1

Same result here as kecoma1. The module works but when I wanna use agolas components I get the error

The requested module '/_nuxt/@fs/.../.pnpm/[email protected][email protected]/node_modules/algoliasearch-helper/index.js?v=c7013610' does not provide an export named 'default'

devonik avatar Oct 14 '25 02:10 devonik

In orderer to give a little more context here... 😉

  • actual file from algolia package: https://github.com/algolia/instantsearch/blob/master/packages/algoliasearch-helper/index.js
  • I noticed that this file is written in CJS
  • With Nuxt4.0 there where some changes to to how CJS files are handles (see: release notes => Refactor => Remove legacy require utils)

I think that this issue is caused upstream and not by this module.

I already created a discussion in the algolia Repo, as I had some trouble to implement in a modern vue environment.

https://github.com/algolia/instantsearch/discussions/6760

dreitzner avatar Oct 23 '25 06:10 dreitzner