Why did the 'algoliasearch' module stop working and shows the error "The requested module 'algoliasearch' does not provide an export named 'default'" even after creating a new algolia node.js code?

This topic was automatically generated from Slack. You can find the original thread here.

import { axios } from "@pipedream/platform";
import { createClient } from '@sanity/client';
import algoliasearch from 'algoliasearch';
import _ from 'lodash';
import slugify from 'slugify';

...

hi, this code contains this line

import algoliasearch from 'algoliasearch';

suddently it stopped working from this morning
also creating a new algolia node.js code, i am getting the same error

The requested module 'algoliasearch' does not provide an export named 'default'

even using this import

import { algoliasearch } from 'algoliasearch';

, possibly because of the new version 5.2.2 of algoliasearch published a few ours ago.

You may need to pin your algoliasearch library to the last working version. For example, if the last working version is 5.2.1, you can pin it in the import statement:

import algoliasearch from 'algoliasearch@5.2.1';

you’re right

import algoliasearch from 'algoliasearch@4.24.0';

Rolling back to algolia 4.24.0 was the solution
algolia 5.x has major changes and I need to update my code to support those news

Thanks!