js-markerclusterer icon indicating copy to clipboard operation
js-markerclusterer copied to clipboard

Named export 'MarkerClusterer' not found

Open martio opened this issue 8 months ago • 1 comments

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;

martio avatar Jun 19 '24 07:06 martio