Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

324
Vistas
Why does calling a undefined method in import.meta throw the error (intermediate value).(...) is not a function?

I am trying to call import.meta.glob() in an Astro/Vite project inside a utility function. A Vite plugin too calls it. And when a Vite plugin runs, Vite hasn't yet started resolving imports. As a result, the import.meta.glob function is getting called by Node.js and not Vite. And it's not present in the Node runtime.

But why is Node.js throwing the error (intermediate value).glob is not a function instead of import.meta.glob is not a function?

But if I run the following code, then I get the error importMeta.glob is not a function correctly.

const importMeta = import.meta;

importMeta.glob();

So, why is it happening for import.meta only? Typically it happens when we forget to place a semicolon between a function declaration and an immediately invoked function expression. But this is definitely not the case here.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda