Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Named export 'MarkerClusterer' not found #885

Open
martio opened this issue Jun 19, 2024 · 1 comment
Open

Named export 'MarkerClusterer' not found #885

martio opened this issue Jun 19, 2024 · 1 comment
Labels
triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@martio
Copy link

martio commented Jun 19, 2024

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;
@martio martio added triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Jun 19, 2024
@enure
Copy link

enure commented Jul 9, 2024

Seemingly related discussion: vitejs/vite#15620

The first suggestion in this comment worked for me:
vitejs/vite#15620 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
2 participants