question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`vite@2.3.5`: `import_meta.glob is not a function`

See original GitHub issue

The latest Vite release vite@2.3.5 breaks and the browser throws Uncaught TypeError: import_meta.glob is not a function.

Seems to be related to the esbuild major update.

https://github.com/vitejs/vite/issues/3617

In the meatime stick to vite@2.3.4.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
brilloutcommented, Oct 1, 2021

Temporary solution: pin to "vite": "2.5.10" (note the missing ^).

0reactions
brilloutcommented, Oct 1, 2021

It’s not the same issue, closing in favor of https://github.com/brillout/vite-plugin-ssr/issues/156

Read more comments on GitHub >

github_iconTop Results From Across the Web

`import_meta.glob is not a function` (updating `vite@2.3.4`
The latest release 2.3.5 breaks vite-plugin-ssr and the browser throws Uncaught TypeError: import_meta.glob is not a function.
Read more >
Vite — Resolve `import.meta.glob` in TypeScript - Future Studio
glob function allowing you to resolve files from a path. In combination with TypeScript, you may have issues that it doesn't pick up...
Read more >
Features | Vite
Vite supports importing multiple modules from the file system via the special import.meta.glob function: js const modules = import.meta.glob('./dir/*.js').
Read more >
记一次成功把Vue2后台项目改造成Vite2的踩坑经历 - 艺灵设计
摘要:公司后台项目基于@花裤衩大神的vue-element-admin,随着项目功能的不断完善和需求不断增加,项目启动也变的越来越慢。慢到什么程度呢?
Read more >
webpack热加载优化及vite踩坑记录 - 掘金
3.5 The requested module 'xxx' does not provide an export named 'xx'. exports 改为export ... 3.9 import.meta.glob webpack build 报错.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found