Chilfish / Weibo-archiver

将微博导出备份的油猴脚本,为号被完全夹没前未雨绸缪 😭
https://weibo.chilfish.top
Apache License 2.0
294 stars 11 forks source link

beta build github actions 提示 `useDark` is not defined #56

Closed Vincentqyw closed 2 months ago

Vincentqyw commented 2 months ago

Bug 描述

beta build Actions 提示 Error: [nuxt] [request error] [unhandled] [500] useDark is not defined

复现步骤

git push 触发github actions

脚本版本

chore(release): v0.4.3

浏览器版本

No response

错误信息

[log] Nuxt 3.13.0 with Nitro 2.9.7
[info] Using Nitro server preset: `static`
[warn] Component did not resolve to a file name in `~/../../../packages/ui/src/index.ts`.
[info] Building client...
[info] vite v5.4.2 building for production...
[info] transforming...
[info] ✓ 2882 modules transformed.
[info] rendering chunks...
[info] computing gzip size...
[info] ../.nuxt/dist/client/manifest.json                   9.46 kB │ gzip:   1.09 kB
[info] ../.nuxt/dist/client/_nuxt/album.DYxTjmLn.css        0.12 kB │ gzip:   0.10 kB
[info] ../.nuxt/dist/client/_nuxt/MainImage.DSwYxZUo.css    0.13 kB │ gzip:   0.11 kB
[info] ../.nuxt/dist/client/_nuxt/web.CjJz5Igy.css          0.22 kB │ gzip:   0.15 kB
[info] ../.nuxt/dist/client/_nuxt/Item.Qh5Kow2p.css         0.34 kB │ gzip:   0.22 kB
[info] ../.nuxt/dist/client/_nuxt/error-500.wBi_3RVH.css    1.88 kB │ gzip:   0.72 kB
[info] ../.nuxt/dist/client/_nuxt/error-404.CkBlEQab.css    3.56 kB │ gzip:   1.10 kB
[info] ../.nuxt/dist/client/_nuxt/entry.nQKxAdU-.css       23.61 kB │ gzip:   5.90 kB
[info] ../.nuxt/dist/client/_nuxt/DlAUqK2U.js               0.09 kB │ gzip:   0.10 kB
[info] ../.nuxt/dist/client/_nuxt/DPPZ547d.js               0.42 kB │ gzip:   0.28 kB
[info] ../.nuxt/dist/client/_nuxt/1e2_h2ye.js               0.57 kB │ gzip:   0.37 kB
[info] ../.nuxt/dist/client/_nuxt/Dy2wH42k.js               1.12 kB │ gzip:   0.74 kB
[info] ../.nuxt/dist/client/_nuxt/HotjvSN0.js               1.86 kB │ gzip:   0.94 kB
[info] ../.nuxt/dist/client/_nuxt/Dor6TEv0.js               2.77 kB │ gzip:   1.24 kB
[info] ../.nuxt/dist/client/_nuxt/DFgHkbD1.js               3.35 kB │ gzip:   1.44 kB
[info] ../.nuxt/dist/client/_nuxt/Cz51e7s0.js               3.48 kB │ gzip:   1.94 kB
[info] ../.nuxt/dist/client/_nuxt/BW2BU_AT.js               5.46 kB │ gzip:   2.69 kB
[info] ../.nuxt/dist/client/_nuxt/GGfU8vku.js               6.37 kB │ gzip:   3.34 kB
[info] ../.nuxt/dist/client/_nuxt/JoQeqV2m.js               8.02 kB │ gzip:   3.58 kB
[info] ../.nuxt/dist/client/_nuxt/B0R8NZ9q.js               8.65 kB │ gzip:   3.48 kB
[info] ../.nuxt/dist/client/_nuxt/DpG5Cy1C.js              15.38 kB │ gzip:   5.92 kB
[info] ../.nuxt/dist/client/_nuxt/D6ehd6Mc.js              27.15 kB │ gzip:   9.96 kB
[info] ../.nuxt/dist/client/_nuxt/Bzl4E6rA.js              38.66 kB │ gzip:  12.20 kB
[info] ../.nuxt/dist/client/_nuxt/BsOzLTQ3.js              95.47 kB │ gzip:  32.17 kB
[info] ../.nuxt/dist/client/_nuxt/CckQMt_N.js             146.09 kB │ gzip:  43.81 kB
[info] ../.nuxt/dist/client/_nuxt/-IevxVjP.js             279.82 kB │ gzip:  68.44 kB
[info] ../.nuxt/dist/client/_nuxt/BkViviqS.js             458.04 kB │ gzip: 152.60 kB
[info] ✓ built in 13.33s
[success] Client built in 13451ms
[info] Building server...
[info] vite v5.4.2 building SSR bundle for production...
[info] transforming...
[info] ✓ 2829 modules transformed.
[info] rendering chunks...
[info] ../.nuxt/dist/server/styles.mjs                                       0.07 kB
[info] ../.nuxt/dist/server/_nuxt/_plugin-vue_export-helper-1tPrXgE0.js      0.25 kB │ map:     0.13 kB
[info] ../.nuxt/dist/server/_nuxt/server-placeholder-DUVZbYrO.js             0.30 kB │ map:     0.70 kB
[info] ../.nuxt/dist/server/_nuxt/use-compitable-eqYuDn38.js                 0.37 kB │ map:     0.79 kB
[info] ../.nuxt/dist/server/_nuxt/search-BbJEJx6J.js                         1.18 kB │ map:     0.33 kB
[info] ../.nuxt/dist/server/_nuxt/post-cR2AiMt-.js                           1.59 kB │ map:     0.56 kB
[info] ../.nuxt/dist/server/_nuxt/WithEmoji-ccZoRYYU.js                      1.76 kB │ map:     0.14 kB
[info] ../.nuxt/dist/server/_nuxt/BrandedLogo-BfDbwfvV.js                    1.88 kB │ map:     0.15 kB
[info] ../.nuxt/dist/server/_nuxt/SimpleBlog-DJjRkNJV.js                     1.97 kB │ map:     1.55 kB
[info] ../.nuxt/dist/server/_nuxt/Wave-xZRBndNF.js                           2.21 kB │ map:     0.13 kB
[info] ../.nuxt/dist/server/_nuxt/island-renderer-MJmFmLoK.js                2.80 kB │ map:     6.66 kB
[info] ../.nuxt/dist/server/_nuxt/Frame-FwbJr0q3.js                          3.24 kB │ map:     0.18 kB
[info] ../.nuxt/dist/server/_nuxt/error-500-BhPtmxyI.js                      4.15 kB │ map:     4.71 kB
[info] ../.nuxt/dist/server/_nuxt/NuxtSeo-D0G-r4QF.js                        5.95 kB │ map:     6.67 kB
[info] ../.nuxt/dist/server/_nuxt/Spin-CcLUrRfK.js                           6.25 kB │ map:    10.92 kB
[info] ../.nuxt/dist/server/_nuxt/multipart-parser-Dd0u6ktt.js               6.89 kB │ map:    10.88 kB
[info] ../.nuxt/dist/server/_nuxt/index-DZwPtbYB.js                          7.68 kB │ map:    17.38 kB
[info] ../.nuxt/dist/server/_nuxt/index-BXSz7OfM.js                          8.01 kB │ map:     7.23 kB
[info] ../.nuxt/dist/server/_nuxt/Pergel-BAeim4Wu.js                         8.30 kB │ map:     8.45 kB
[info] ../.nuxt/dist/server/_nuxt/UnJs-CgtD3Kgk.js                          10.12 kB │ map:    10.68 kB
[info] ../.nuxt/dist/server/_nuxt/default-DWH0qzjk.js                       12.81 kB │ map:    14.04 kB
[info] ../.nuxt/dist/server/_nuxt/error-404-B13_QKwL.js                     15.02 kB │ map:    28.08 kB
[info] ../.nuxt/dist/server/_nuxt/Nuxt-JdkiyB7z.js                          15.40 kB │ map:    16.75 kB
[info] ../.nuxt/dist/server/_nuxt/public-CoFWKjac.js                        17.86 kB │ map:   294.61 kB
[info] ../.nuxt/dist/server/_nuxt/example-Cyozah00.js                       22.16 kB │ map:    28.04 kB
[info] ../.nuxt/dist/server/_nuxt/Item-DBgYbuSR.js                          61.67 kB │ map:    83.[19](https://github.com/Vincentqyw/Weibo-archiver/actions/runs/10877484323/job/30178925691#step:6:20) kB
[info] ../.nuxt/dist/server/_nuxt/album-BB3GPdyU.js                         69.77 kB │ map:   118.14 kB
[info] ../.nuxt/dist/server/_nuxt/Image-CSW3VwXQ.js                        139.46 kB │ map:   295.43 kB
[info] ../.nuxt/dist/server/server.mjs                                   2,089.01 kB │ map: 3,924.25 kB
[info] ✓ built in 11.76s
[success] Server built in 11768ms
[info] [nitro] Initializing prerenderer
[info] [nitro] Prerendering 5 initial routes with crawler
[log] [nitro]   ├─ /__sitemap__/style.xsl (23ms)
[log] [nitro]   ├─ /robots.txt (33ms)
[log] [nitro]   ├─ /[20](https://github.com/Vincentqyw/Weibo-archiver/actions/runs/10877484323/job/30178925691#step:6:21)0.html (106ms)
[log] [nitro]   ├─ /404.html (100ms)
Error:  [nuxt] [request error] [unhandled] [500] useDark is not defined
  at <anonymous> (./.nuxt/dist/server/server.mjs:48766:16)  
  at ModuleJob.run (node:internal/modules/esm/module_job:234:25)  
  at async ModuleLoader.import (node:internal/modules/esm/loader:473:24)  
  at async ./.nuxt/prerender/chunks/_/renderer3.mjs:144:24  
  at async ./.nuxt/prerender/chunks/_/renderer3.mjs:272:64  
  at async Object.handler (./.nuxt/prerender/chunks/_/renderer3.mjs:23:[22](https://github.com/Vincentqyw/Weibo-archiver/actions/runs/10877484323/job/30178925691#step:6:23))  
  at async Object.handler (/home/runner/work/Weibo-archiver/Weibo-archiver/node_modules/.pnpm/h3@1.12.0/node_modules/h3/dist/index.mjs:1975:19)  
  at async toNodeHandle (/home/runner/work/Weibo-archiver/Weibo-archiver/node_modules/.pnpm/h3@1.12.0/node_modules/h3/dist/index.mjs:2266:7)  
  at async ufetch (/home/runner/work/Weibo-archiver/Weibo-archiver/node_modules/.pnpm/unenv@1.10.0/node_modules/unenv/runtime/fetch/index.mjs:9:17)  
  at async generateRoute (/home/runner/work/Weibo-archiver/Weibo-archiver/node_modules/.pnpm/nitropack@2.9.7_better-sqlite3@9.6.0_encoding@0.1.13_magicast@0.3.4/node_modules/nitropack/dist/chunks/prerender.mjs:116:17)  
  at async Promise.all (index 1)  
  at async runParallel (/home/runner/work/Weibo-archiver/Weibo-archiver/node_modules/.pnpm/nitropack@2.9.7_better-sqlite3@9.6.0_encoding@0.1.13_magicast@0.3.4/node_modules/nitropack/dist/chunks/prerender.mjs:253:3)  
  at async prerender (/home/runner/work/Weibo-archiver/Weibo-archiver/node_modules/.pnpm/nitropack@2.9.7_better-sqlite3@9.6.0_encoding@0.1.13_magicast@0.3.4/node_modules/nitropack/dist/chunks/prerender.mjs:202:3)  
  at async /home/runner/work/Weibo-archiver/Weibo-archiver/node_modules/.pnpm/nuxt@3.13.0_@parcel+watcher@2.4.1_@types+node@20.11.24_better-sqlite3@9.6.0_encoding@0.1.13_e_fnuqozthn4mlgy7et6h6yymg4q/node_modules/nuxt/dist/index.mjs:3647:7  
  at async build (/home/runner/work/Weibo-archiver/Weibo-archiver/node_modules/.pnpm/nuxt@3.13.0_@parcel+watcher@2.4.1_@types+node@20.11.24_better-sqlite3@9.6.0_encoding@0.1.13_e_fnuqozthn4mlgy7et6h6yymg4q/node_modules/nuxt/dist/index.mjs:5532:5)  
  at async Object.run (/home/runner/work/Weibo-archiver/Weibo-archiver/node_modules/.pnpm/nuxi@3.12.0/node_modules/nuxi/dist/chunks/build.mjs:94:5)  
  at async Object.run (/home/runner/work/Weibo-archiver/Weibo-archiver/node_modules/.pnpm/nuxi@3.12.0/node_modules/nuxi/dist/chunks/generate.mjs:55:5)  
  at async runCommand$1 (/home/runner/work/Weibo-archiver/Weibo-archiver/node_modules/.pnpm/nuxi@3.12.0/node_modules/nuxi/dist/shared/nuxi.6aad497e.mjs:1648:16)  
  at async runCommand$1 (/home/runner/work/Weibo-archiver/Weibo-archiver/node_modules/.pnpm/nuxi@3.12.0/node_modules/nuxi/dist/shared/nuxi.6aad497e.mjs:1639:11)  
  at async runMain$1 (/home/runner/work/Weibo-archiver/Weibo-archiver/node_modules/.pnpm/nuxi@3.12.0/node_modules/nuxi/dist/shared/nuxi.6aad497e.mjs:1777:7)
Error:  [nuxt] [request error] [unhandled] [500] useDark is not defined
  at <anonymous> (./.nuxt/dist/server/server.mjs:48766:16)  
  at ModuleJob.run (node:internal/modules/esm/module_job:[23](https://github.com/Vincentqyw/Weibo-archiver/actions/runs/10877484323/job/30178925691#step:6:24)4:25)  
  at async ModuleLoader.import (node:internal/modules/esm/loader:473:[24](https://github.com/Vincentqyw/Weibo-archiver/actions/runs/10877484323/job/30178925691#step:6:25))  
  at async ./.nuxt/prerender/chunks/_/renderer3.mjs:144:24  
  at async ./.nuxt/prerender/chunks/_/renderer3.mjs:272:64  
  at async Object.handler (./.nuxt/prerender/chunks/_/renderer3.mjs:23:22)  
  at async Object.handler (/home/runner/work/Weibo-archiver/Weibo-archiver/node_modules/.pnpm/h3@1.12.0/node_modules/h3/dist/index.mjs:1975:19)  
  at async toNodeHandle (/home/runner/work/Weibo-archiver/Weibo-archiver/node_modules/.pnpm/h3@1.12.0/node_modules/h3/dist/index.mjs:2266:7)  
  at async ufetch (/home/runner/work/Weibo-archiver/Weibo-archiver/node_modules/.pnpm/unenv@1.10.0/node_modules/unenv/runtime/fetch/index.mjs:9:17)  
  at async generateRoute (/home/runner/work/Weibo-archiver/Weibo-archiver/node_modules/.pnpm/nitropack@2.9.7_better-sqlite3@9.6.0_encoding@0.1.13_magicast@0.3.4/node_modules/nitropack/dist/chunks/prerender.mjs:116:17)  
  at async Promise.all (index 1)  
  at async runParallel (/home/runner/work/Weibo-archiver/Weibo-archiver/node_modules/.pnpm/nitropack@2.9.7_better-sqlite3@9.6.0_encoding@0.1.13_magicast@0.3.4/node_modules/nitropack/dist/chunks/prerender.mjs:[25](https://github.com/Vincentqyw/Weibo-archiver/actions/runs/10877484323/job/30178925691#step:6:26)3:3)  
  at async prerender (/home/runner/work/Weibo-archiver/Weibo-archiver/node_modules/.pnpm/nitropack@2.9.7_better-sqlite3@9.6.0_encoding@0.1.13_magicast@0.3.4/node_modules/nitropack/dist/chunks/prerender.mjs:202:3)  
  at async /home/runner/work/Weibo-archiver/Weibo-archiver/node_modules/.pnpm/nuxt@3.13.0_@parcel+watcher@2.4.1_@types+node@20.11.24_better-sqlite3@9.6.0_encoding@0.1.13_e_fnuqozthn4mlgy7et6h6yymg4q/node_modules/nuxt/dist/index.mjs:3647:7  
  at async build (/home/runner/work/Weibo-archiver/Weibo-archiver/node_modules/.pnpm/nuxt@3.13.0_@parcel+watcher@2.4.1_@types+node@20.11.24_better-sqlite3@9.6.0_encoding@0.1.13_e_fnuqozthn4mlgy7et6h6yymg4q/node_modules/nuxt/dist/index.mjs:5532:5)  
  at async Object.run (/home/runner/work/Weibo-archiver/Weibo-archiver/node_modules/.pnpm/nuxi@3.12.0/node_modules/nuxi/dist/chunks/build.mjs:94:5)  
  at async Object.run (/home/runner/work/Weibo-archiver/Weibo-archiver/node_modules/.pnpm/nuxi@3.12.0/node_modules/nuxi/dist/chunks/generate.mjs:55:5)  
  at async runCommand$1 (/home/runner/work/Weibo-archiver/Weibo-archiver/node_modules/.pnpm/nuxi@3.12.0/node_modules/nuxi/dist/shared/nuxi.6aad497e.mjs:1648:16)  
  at async runCommand$1 (/home/runner/work/Weibo-archiver/Weibo-archiver/node_modules/.pnpm/nuxi@3.12.0/node_modules/nuxi/dist/shared/nuxi.6aad497e.mjs:1639:11)  
  at async runMain$1 (/home/runner/work/Weibo-archiver/Weibo-archiver/node_modules/.pnpm/nuxi@3.12.0/node_modules/nuxi/dist/shared/nuxi.6aad497e.mjs:1777:7)
[log] [nitro]   ├─ / ([31](https://github.com/Vincentqyw/Weibo-archiver/actions/runs/10877484323/job/30178925691#step:6:32)7ms)
  │ └── Error: [500] 
[log] [nitro]   ├─ /sitemap.xml (8ms)
[log] [nitro] 
Errors prerendering:
[log] [nitro]   ├─ / (317ms)
  │ └── Error: [500] 
[log] [nitro]
Error:  Exiting due to prerender errors.
  at prerender (/home/runner/work/Weibo-archiver/Weibo-archiver/node_modules/.pnpm/nitropack@2.9.7_better-sqlite3@9.6.0_encoding@0.1.13_magicast@0.3.4/node_modules/nitropack/dist/chunks/prerender.mjs:220:11)
  at async /home/runner/work/Weibo-archiver/Weibo-archiver/node_modules/.pnpm/nuxt@3.13.0_@parcel+watcher@2.4.1_@types+node@20.11.24_better-sqlite3@9.6.0_encoding@0.1.13_e_fnuqozthn4mlgy7et6h6yymg4q/node_modules/nuxt/dist/index.mjs:3647:7
  at async build (/home/runner/work/Weibo-archiver/Weibo-archiver/node_modules/.pnpm/nuxt@3.13.0_@parcel+watcher@2.4.1_@types+node@20.11.24_better-sqlite3@9.6.0_encoding@0.1.13_e_fnuqozthn4mlgy7et6h6yymg4q/node_modules/nuxt/dist/index.mjs:55[32](https://github.com/Vincentqyw/Weibo-archiver/actions/runs/10877484323/job/30178925691#step:6:33):5)
  at async Object.run (/home/runner/work/Weibo-archiver/Weibo-archiver/node_modules/.pnpm/nuxi@3.12.0/node_modules/nuxi/dist/chunks/build.mjs:94:5)
  at async Object.run (/home/runner/work/Weibo-archiver/Weibo-archiver/node_modules/.pnpm/nuxi@3.12.0/node_modules/nuxi/dist/chunks/generate.mjs:55:5)
  at async runCommand$1 (/home/runner/work/Weibo-archiver/Weibo-archiver/node_modules/.pnpm/nuxi@3.12.0/node_modules/nuxi/dist/shared/nuxi.6aad497e.mjs:1648:16)
  at async runCommand$1 (/home/runner/work/Weibo-archiver/Weibo-archiver/node_modules/.pnpm/nuxi@3.12.0/node_modules/nuxi/dist/shared/nuxi.6aad497e.mjs:1639:11)
  at async runMain$1 (/home/runner/work/Weibo-archiver/Weibo-archiver/node_modules/.pnpm/nuxi@3.12.0/node_modules/nuxi/dist/shared/nuxi.6aad497e.mjs:1777:7) 

Error:  Exiting due to prerender errors.
/home/runner/work/Weibo-archiver/Weibo-archiver/apps/web:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  @weibo-archiver/web@0.4.3 generate: `nuxi generate`
Exit status 1
 ELIFECYCLE  Command failed with exit code 1.
node:internal/errors:984
  const err = new Error(message);
              ^

Error: Command failed: pnpm build:web
    at genericNodeError (node:internal/errors:984:15)
    at wrappedFn (node:internal/errors:538:14)
    at checkExecSyncError (node:child_process:891:11)
    at execSync (node:child_process:963:15)
    at <anonymous> (/home/runner/work/Weibo-archiver/Weibo-archiver/release.ts:41:1)
    at ModuleJob.run (node:internal/modules/esm/module_job:2[34](https://github.com/Vincentqyw/Weibo-archiver/actions/runs/10877484323/job/30178925691#step:6:35):25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:473:24)
    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:123:5) {
  status: 1,
  signal: null,
  output: [ null, null, null ],
  pid: 1925,
  stdout: null,
  stderr: null
}

Node.js v20.17.0
 ELIFECYCLE  Command failed with exit code 1.
Error: Process completed with exit code 1.

附加截图

image

Chilfish commented 2 months ago

我这边似乎没法复现出来,我重新fork并无缓存运行最新的actions时并没有报错,请问能提供一些更改过的信息吗?

里面提示的 useDark 是由 https://github.com/unplugin/unplugin-auto-importNuxt 的自动导入插件声明在了 auto-import.d.ts,在构建时会自动解析依赖,应该不会报错undefined才对

无更改运行的 actions https://github.com/Organic-Fish/Weibo-archiver/actions/runs/10877691510/job/30179445286

Vincentqyw commented 2 months ago

已解,少拷贝了个文件。