Hello!
I've been hitting a bunch of issues with SSR and external packages, mostly overcame them, but hit a bit of a snag when trying to use the Algolia recommend package.
I have a simple app set up like so:
import {
frequentlyBoughtTogether,
relatedProducts,
} from "@algolia/recommend-js"
import recommend from "@algolia/recommend"
// ...
When bundling for SSR and starting the server I get the following error in the terminal:
import { frequentlyBoughtTogether, relatedProducts } from '@algolia/recommend-js';
^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Named export 'frequentlyBoughtTogether' not found. The requested module '@algolia/recommend-js' is a CommonJS module, which may not support all module.exports as named exports.
Has anyone come against this kind of issue before?
Thanks 🙂