I have an issue with Next.js. When I'm trying to import a node module,
the module uses the window
object and Next.js is throwing an error: window is not defined
.
The module is imported like this:
import * as widgets from 'survey-widgets';
widgets.autocomplete(Survey);
I guess Next.js dynamic imports will not work in my case. Is there any way of doing it?