yarnpkg / yarn

The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
https://classic.yarnpkg.com
Other
41.4k stars 2.73k forks source link

yarn build fails with [request error] [unhandled] [500] Cannot read properties of undefined (reading '_path') #8891

Closed ChurikiTenna closed 1 year ago

ChurikiTenna commented 1 year ago

It was working fine last week, but suddenly this error appeared.

% yarn build
Nuxi 3.0.0-rc.10-27718444.40d0907                                                                                                       13:55:23
Nuxt 3.0.0-rc.10-27718444.40d0907 with Nitro 0.5.2-27719398.ad659e0                                                                     13:55:23
ℹ Please create ~/components/content and restart the Nuxt server to use components in Markdown                            @nuxt/content 13:55:24

 WARN  [kit] [compat] Using extendBuild in Nuxt 3 has no effect. Instead call extendWebpackConfig and extendViteConfig.                 13:55:25

 WARN                                                                                                                                   13:55:35
(!) 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 8656ms                                                                                                                13:55:35
ℹ Building server...                                                                                                                    13:55:35
✔ Server built in 6050ms                                                                                                                13:55:41
✔ Generated public .output/public                                                                                                 nitro 13:55:41
ℹ Initializing prerenderer                                                                                                        nitro 13:55:41
ℹ Prerendering 1 routes                                                                                                           nitro 13:55:48

 ERROR  [nuxt] [request error] [unhandled] [500] Cannot read properties of undefined (reading '_path')                                  13:55:48
  at ./.nuxt/prerender/chunks/nitro/nitro-prerenderer.mjs:2020:21  
  at Array.reduce (<anonymous>)  
  at getContentIndex (./.nuxt/prerender/chunks/nitro/nitro-prerenderer.mjs:2019:25)  
  at async ./.nuxt/prerender/chunks/nitro/nitro-prerenderer.mjs:2361:3  
  at async ./node_modules/h3/dist/index.mjs:592:19  
  at async nodeHandler (./node_modules/h3/dist/index.mjs:538:7)  
  at async ufetch (./node_modules/unenv/runtime/fetch/index.mjs:9:17)  
  at async generateRoute (./node_modules/nitropack/dist/shared/nitro.7247c279.mjs:2692:17)  
  at async prerender (./node_modules/nitropack/dist/shared/nitro.7247c279.mjs:2737:22)  
  at async ./node_modules/nuxt/dist/index.mjs:1422:7  
  at async build (./node_modules/nuxt/dist/index.mjs:1991:5)  
  at async Object.invoke (./node_modules/nuxi/dist/chunks/build.mjs:45:5)  
  at async _main (./node_modules/nuxi/dist/cli.mjs:50:20)

  ├─ /api/_content/cache (23ms) (Error: [500] Internal Server Error)                                                              nitro 13:55:49
start Building server...                                                                                                          nitro 13:55:49
start Writing server bundle...                                                                                                    nitro 13:55:59
✔ Server built                                                                                                                    nitro 13:56:01
  ├─ .output/server/package.json (3.83 kB) (1.15 kB gzip)
  ├─ .output/server/index.mjs (1.34 kB) (498 B gzip)
 ...
  ├─ .output/server/chunks/app/_nuxt/about.a47ed734.mjs (12.8 kB) (1.88 kB gzip)
  ├─ .output/server/chunks/app/_nuxt/404.22e09f63.mjs.map (1.5 kB) (617 B gzip)
  └─ .output/server/chunks/app/_nuxt/404.22e09f63.mjs (2.9 kB) (1.11 kB gzip)
Σ Total size: 14.7 MB (2.87 MB gzip)
✔ You can preview this build using node .output/server/index.mjs  

It is my simple Nuxt project. https://github.com/ChurikiTenna/mySite

% yarn -v 
3.2.3
merceyz commented 1 year ago

This doesn't look like a Yarn error and therefore isn't something we can assist with.