nuxt/framework

[unhandledRejection] Invalid value used as weak map key

YumiSuki opened this issue · 1 comments

Environment


  • Operating System: Linux
  • Node Version: v16.11.0
  • Nuxt Version: 3.0.0-rc.1
  • Package Manager: yarn@1.22.18
  • Builder: vite
  • User Config: target, modern, head, css, plugins, components, buildModules, modules, tailwindcss, sitemap, build, server, generate, router, vite
  • Runtime Modules: @nuxtjs/sitemap@2.4.0
  • Build Modules: -

Reproduction

Not yet available

Describe the bug

Hello forks,

Currently, I am trying to convert one of my project written in Nuxt 2 into Nuxt 3. The project is running in yarn dev pretty well but
when I tried to build the project, it's throwing some error and exit without giving any proper way to debug.

Here is the log I received when trying to generate the project for static hosting:

$ nuxi generate
Nuxt CLI v3.0.0-rc.1                                                                                                                                                                                    21:52:29
ℹ Vite client warmed up in 2401ms                                                                                                                                                                       21:52:36

 WARN                                                                                                                                                                                                   21:52:45
(!) Some chunks are larger than 500 KiB after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/guide/en/#outputmanualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.

ℹ Client built in 11415ms                                                                                                                                                                               21:52:45
ℹ Building server...                                                                                                                                                                                    21:52:45
✔ Server built in 1528ms                                                                                                                                                                                21:52:47
✔ Generated public .output/public                                                                                                                                                                 nitro 21:52:47
ℹ Initializing prerenderer                                                                                                                                                                        nitro 21:52:47
ℹ Prerendering 1 initial routes with crawler                                                                                                                                                      nitro 21:52:50
  ├─ / (232ms)                                                                                                                                                                                    nitro 21:52:51
  ├─ /blog/ (8ms) (Error: [404] )                                                                                                                                                                 nitro 21:52:51
  ├─ /about/ (7ms)                                                                                                                                                                                nitro 21:52:51
  ├─ /contact/ (7ms)                                                                                                                                                                              nitro 21:52:51

 ERROR  [unhandledRejection] Invalid value used as weak map key                                                                                                                                         21:52:51

  at WeakMap.set (<anonymous>)
  at normalizePropsOptions (.nuxt/prerender/chunks/index.mjs:4630:11)
  at createComponentInstance (.nuxt/prerender/chunks/index.mjs:7486:23)
  at renderComponentVNode (.nuxt/prerender/chunks/index.mjs:9919:22)
  at Object.ssrRenderComponent (.nuxt/prerender/chunks/index.mjs:10351:12)
  at .nuxt/prerender/chunks/app/server.mjs:8370:39
  at renderFnWithContext (.nuxt/prerender/chunks/index.mjs:2379:21)
  at Object.ssrRenderSlot (.nuxt/prerender/chunks/index.mjs:10363:21)
  at _sfc_ssrRender$o (.nuxt/prerender/chunks/app/server.mjs:5860:26)
  at renderComponentSubTree (.nuxt/prerender/chunks/index.mjs:9991:13)

  ├─ /privacy/ (9ms)                                                                                                                                                                              nitro 21:52:51
  ├─ /disclaimer/ (10ms)                                                                                                                                                                          nitro 21:52:51
                                                                                                                                                        nitro 21:52:51
✔ You can now deploy .output/public to any static hosting!                                                                                                                                              21:52:51
Done in 21.50s.

Note: I have deleted some file from pages directory for debugging purpose that's why 404 is printing in the log.

So, anyone know what's going on here?

Additional context

No response

Logs

No response

It's a pain - but that error means that you're using a component that isn't registered. It looks like it's in your privacy.vue.

Let's track the DX improvement (it's a Vue error) in https://github.com/nuxt/framework/issues/227.