googlemaps / googlemaps/js-markerclusterer

Named export 'MarkerClusterer' not found

Open
#885 1 comment 1 reaction 0 assignees View on GitHub
triage me type: bug
Dominant language
TypeScript
Stars
293
Forks
104
Avg merge
3m
Merged PRs (30d)
18

Description

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/@googlemaps+markerclusterer@2.5.3/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/@googlemaps+markerclusterer@2.5.3/node_modules/@googlemaps/markerclusterer/dist/index.umd.js';
const { MarkerClusterer } = pkg;

import { MarkerClusterer } from 'node_modules/.pnpm/@googlemaps+markerclusterer@2.5.3/node_modules/@googlemaps/markerclusterer/dist/index.umd.js';
^^^^^^^^^^^^^^^
SyntaxError: Named export 'MarkerClusterer' not found. The requested module 'node_modules/.pnpm/@googlemaps+markerclusterer@2.5.3/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/@googlemaps+markerclusterer@2.5.3/node_modules/@googlemaps/markerclusterer/dist/index.umd.js';
const { MarkerClusterer } = pkg;
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.