js-markerclusterer
js-markerclusterer copied to clipboard
Named export 'MarkerClusterer' not found
I installed the library "@googlemaps+markerclusterer" in a Nuxt 3 application and I have this problem during prerender.
Stack trace
ERROR Named export 'MarkerClusterer' not found. The requested module '.../node_modules/.pnpm/@[email protected]/node_modules/@googlemaps/markerclusterer/dist/index.umd.js' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from '.../node_modules/.pnpm/@[email protected]/node_modules/@googlemaps/markerclusterer/dist/index.umd.js';
const { MarkerClusterer } = pkg;
import { MarkerClusterer } from 'node_modules/.pnpm/@[email protected]/node_modules/@googlemaps/markerclusterer/dist/index.umd.js';
^^^^^^^^^^^^^^^
SyntaxError: Named export 'MarkerClusterer' not found. The requested module 'node_modules/.pnpm/@[email protected]/node_modules/@googlemaps/markerclusterer/dist/index.umd.js' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from 'node_modules/.pnpm/@[email protected]/node_modules/@googlemaps/markerclusterer/dist/index.umd.js';
const { MarkerClusterer } = pkg;