Skip to content

pnpm build遇到错误,如何解决? #86

@briteming

Description

@briteming

hi.

$ pnpm build

urara@1.0.0 build C:\Users\12799\urara
run-s tsc urara:build kit:build clean

urara@1.0.0 tsc C:\Users\12799\urara
tsc -p tsconfig.node.json

urara@1.0.0 urara:build C:\Users\12799\urara
node urara.js build

08:23:38 [urara] make dir static
08:23:38 [urara] make dir src/static
08:23:38 [urara] make dir src\routes\assets
08:23:38 [urara] make dir static\assets
08:23:38 [urara] make dir src\static\assets
08:23:38 [urara] make dir static\hello-world
08:23:38 [urara] make dir src\routes\hello-world
08:23:38 [urara] make dir src\static\hello-world
08:23:38 [urara] make dir src\routes\hello-world\elements
08:23:38 [urara] make dir static\hello-world\elements
08:23:38 [urara] make dir src\static\hello-world\elements
08:23:39 [urara] make dir src\routes\hello-world\toc-disabled
08:23:39 [urara] copy file src\routes\hello-world+page.svelte.md
08:23:39 [urara] make dir static\hello-world\toc-disabled
08:23:39 [urara] make dir src\static\hello-world\toc-disabled
08:23:39 [urara] copy file static\assets\any@512.png
08:23:39 [urara] copy file static\assets\any@180.png
08:23:39 [urara] copy file static\favicon.png
08:23:39 [urara] copy file static\assets\any@192.png
08:23:39 [urara] copy file static\assets\maskable@192.png
08:23:39 [urara] copy file src\routes\hello-world\elements+page.svelte.md
08:23:39 [urara] copy file static\hello-world\urara.webp
08:23:39 [urara] copy file src\routes\hello-world\toc-disabled+page.md
08:23:39 [urara] copy file static\assets\maskable@512.png

urara@1.0.0 kit:build C:\Users\12799\urara
cross-env NODE_OPTIONS=--max_old_space_size=7680 vite build

vite v5.1.1 building SSR bundle for production...
transforming (80) node_modules.pnpm@sveltejs+kit@2.5.0_@sveltejs+vite-plu
🌼 daisyUI 4.6.2
├─ ✔︎ 12 themes added https://daisyui.com/docs/themes
╰─ ❤︎ Support daisyUI project: https://opencollective.com/daisyui

🌼 daisyUI 4.6.2
├─ ✔︎ 12 themes added https://daisyui.com/docs/themes
╰─ ★ Star daisyUI on GitHub https://github.com/saadeghi/daisyui

transforming (119) src\lib\components\prose\img.svelte08:23:48 [vite-plugin-svelte] C:/Users/12799/urara/src/lib/components/post_toc.svelte:54:10 A11y: with click handler must have an ARIA role
52: <li class='flex flex-col' id={toc-item-${slug}}>
53:
54: <span
^
55: class="cursor-pointer border-l-4 border-transparent transition-all hover:border-primary hover:bg-base-content hover:bg-opacity-10 active:bg-primary active:text-primary-content active:font-bold pr-4{depth
56: <= 2
✓ 166 modules transformed.
rendering chunks (27)...(node:22100) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.
(Use node --trace-deprecation ... to show where the warning was created)
vite v5.1.1 building for production...
transforming (103) src\lib\config\general.ts08:23:55 [vite-plugin-svelte] C:/Users/12799/urara/src/lib/components/post_toc.svelte:54:10 A11y: with click handler must have an ARIA role
52: <li class='flex flex-col' id={toc-item-${slug}}>
53:
54: <span
^
55: class="cursor-pointer border-l-4 border-transparent transition-all hover:border-primary hover:bg-base-content hover:bg-opacity-10 active:bg-primary active:text-primary-content active:font-bold pr-4{depth
56: <= 2
✓ 135 modules transformed.
.svelte-kit/output/client/_app/version.json
0.03 kB │ gzip: 0.05 kB
.svelte-kit/output/client/.vite/manifest.json
6.10 kB │ gzip: 0.97 kB
.svelte-kit/output/client/_app/immutable/assets/urara.CoHjeEFW.avif
12.61 kB
.svelte-kit/output/client/_app/immutable/assets/favicon.DiqaJUa5.avif
23.00 kB
.svelte-kit/output/client/_app/immutable/assets/posts.D4gQgZwN.css
0.44 kB │ gzip: 0.23 kB
.svelte-kit/output/client/_app/immutable/assets/0.C9CoXRIv.css
106.91 kB │ gzip: 18.62 kB
.svelte-kit/output/client/_app/immutable/entry/start.CHzI6prP.js
0.07 kB │ gzip: 0.08 kB
.svelte-kit/output/client/_app/immutable/chunks/stores.CNSca7nU.js
0.23 kB │ gzip: 0.17 kB
.svelte-kit/output/client/_app/immutable/chunks/posts.4dVmwM_k.js
0.30 kB │ gzip: 0.23 kB
.svelte-kit/output/client/_app/immutable/chunks/index.BI7v63FY.js
0.45 kB │ gzip: 0.32 kB
.svelte-kit/output/client/_app/immutable/nodes/1.Y113fK_j.js
0.84 kB │ gzip: 0.52 kB
.svelte-kit/output/client/_app/immutable/chunks/preload-helper.BQ24v_F8.js
0.91 kB │ gzip: 0.56 kB
.svelte-kit/output/client/_app/immutable/nodes/5.C-yPLSwo.js
2.20 kB │ gzip: 1.15 kB
.svelte-kit/output/client/app/immutable/chunks/posts.DhIe2gb.js
2.49 kB │ gzip: 1.26 kB
.svelte-kit/output/client/_app/immutable/chunks/scheduler.FGUOCI5T.js
2.77 kB │ gzip: 1.32 kB
.svelte-kit/output/client/_app/immutable/nodes/3.3R-IqVJ9.js
4.66 kB │ gzip: 1.90 kB
.svelte-kit/output/client/_app/immutable/chunks/workbox-window.prod.es5.DFjpnwFp.js 5.29 kB │ gzip: 2.19 kB
.svelte-kit/output/client/_app/immutable/entry/app.B2cl9_uC.js
5.90 kB │ gzip: 2.20 kB
.svelte-kit/output/client/_app/immutable/chunks/post_layout.BG0AmA4i.js
10.75 kB │ gzip: 4.11 kB
.svelte-kit/output/client/_app/immutable/chunks/index.TPYxZWDS.js
11.46 kB │ gzip: 4.90 kB
.svelte-kit/output/client/_app/immutable/nodes/2.DhDS65G0.js
14.27 kB │ gzip: 5.26 kB
.svelte-kit/output/client/_app/immutable/nodes/0.DN7NveTH.js
24.89 kB │ gzip: 8.21 kB
.svelte-kit/output/client/_app/immutable/chunks/entry.BNfZGwt4.js
26.53 kB │ gzip: 10.52 kB
.svelte-kit/output/client/_app/immutable/nodes/4.DNb5CQOP.js
32.18 kB │ gzip: 11.28 kB
.svelte-kit/output/client/_app/immutable/chunks/post_card.CJDnxPmc.js
59.80 kB │ gzip: 17.32 kB
Browserslist: caniuse-lite is outdated. Please run:
npx update-browserslist-db@latest
Why you should do it regularly: https://github.com/browserslist/update-db#readme

PWA v0.17.5
mode generateSW
precache 68 entries (710.83 KiB)
files generated
.svelte-kit\output\client\sw.js
.svelte-kit\output\client\workbox-f3e6b16a.js
warnings
One of the glob patterns doesn't match any files. Please remove or fix the following: {
"globDirectory": ".svelte-kit/output",
"globPattern": "posts.json",
"globIgnores": [
"/sw*",
"
/workbox-",
"client/sw.js",
"client/workbox-
.js"
]
}
One of the glob patterns doesn't match any files. Please remove or fix the following: {
"globDirectory": ".svelte-kit/output",
"globPattern": "prerendered//*.html",
"globIgnores": [
"
/sw*",
"**/workbox-",
"client/sw.js",
"client/workbox-
.js"
]
}

✓ built in 9.24s
SvelteKitError: Not found: /elements
at resolve2 (file:///C:/Users/12799/urara/.svelte-kit/output/server/index.js:3431:18)
at resolve (file:///C:/Users/12799/urara/.svelte-kit/output/server/index.js:3263:34)
at Object.handle (file:///C:/Users/12799/urara/.svelte-kit/output/server/chunks/hooks.server.js:2:52)
at respond (file:///C:/Users/12799/urara/.svelte-kit/output/server/index.js:3261:43) {
status: 404,
text: 'Not Found'
}
SvelteKitError: Not found: /toc-disabled
at resolve2 (file:///C:/Users/12799/urara/.svelte-kit/output/server/index.js:3431:18)
at resolve (file:///C:/Users/12799/urara/.svelte-kit/output/server/index.js:3263:34)
at Object.handle (file:///C:/Users/12799/urara/.svelte-kit/output/server/chunks/hooks.server.js:2:52)
at respond (file:///C:/Users/12799/urara/.svelte-kit/output/server/index.js:3261:43) {
status: 404,
text: 'Not Found'
}

node:internal/event_target:1101
process.nextTick(() => { throw err; });
^
Error: 404 /elements (linked from /)
To suppress or handle this error, implement handleHttpError in https://kit.svelte.dev/docs/configuration#prerender
at file:///C:/Users/12799/urara/node_modules/.pnpm/@sveltejs+kit@2.5.0_@sveltejs+vite-plugin-svelte@3.0.2_svelte@4.2.10_vite@5.1.1_@types+node@2_koq3ersix6ahwrpqcmv22k3req/node_modules/@sveltejs/kit/src/core/config/options.js:202:13
at file:///C:/Users/12799/urara/node_modules/.pnpm/@sveltejs+kit@2.5.0_@sveltejs+vite-plugin-svelte@3.0.2_svelte@4.2.10_vite@5.1.1_@types+node@2_koq3ersix6ahwrpqcmv22k3req/node_modules/@sveltejs/kit/src/core/postbuild/prerender.js:65:25
at save (file:///C:/Users/12799/urara/node_modules/.pnpm/@sveltejs+kit@2.5.0_@sveltejs+vite-plugin-svelte@3.0.2_svelte@4.2.10_vite@5.1.1_@types+node@2_koq3ersix6ahwrpqcmv22k3req/node_modules/@sveltejs/kit/src/core/postbuild/prerender.js:403:4)
at visit (file:///C:/Users/12799/urara/node_modules/.pnpm/@sveltejs+kit@2.5.0_@sveltejs+vite-plugin-svelte@3.0.2_svelte@4.2.10_vite@5.1.1_@types+node@2_koq3ersix6ahwrpqcmv22k3req/node_modules/@sveltejs/kit/src/core/postbuild/prerender.js:236:3)

Node.js v23.3.0
 ELIFECYCLE  Command failed with exit code 1.
ERROR: "kit:build" exited with 1.
 ELIFECYCLE  Command failed with exit code 1.

谢谢回复。

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions