You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[build] Waiting for integration "@astrojs/vercel", hook "astro:build:done"...
✘ [ERROR] Could not resolve "node:path"
dist/server/_astro-internal_middleware.mjs:2:24:
2 │ import { dirname } from 'node:path';
╵ ~~~~~~~~~~~
The package "node:path" wasn't found on the file system but is built into node. Are you trying to bundle for node? You can use "platform: 'node'" to do that, which will remove this error.
Could not resolve "node:path"
Location:
dist/server/_astro-internal_middleware.mjs:2:24
Stack trace:
at failureErrorWithLog (/home/projects/github-7ls6muoe/node_modules/esbuild/lib/main.js:1466:15)
at runOnEndCallbacks (/home/projects/github-7ls6muoe/node_modules/esbuild/lib/main.js:1306:49)
at buildOrContextContinue/< (/home/projects/github-7ls6muoe/node_modules/esbuild/lib/main.js:960:16)
at handleIncomingPacket (/home/projects/github-7ls6muoe/node_modules/esbuild/lib/main.js:667:20)
at emit (node:events:30:10899)
at readableAddChunk (node:internal/streams/readable:225:3393)
at onStreamRead (node:internal/stream_base_commons:211:2596)
at _0x12b09d/< (https://github7ls6muoe-103g.w-corp-staticblitz.com/blitz.d20a0a75.js:40:514366)
at _0x520d6d (https://github7ls6muoe-103g.w-corp-staticblitz.com/blitz.d20a0a75.js:40:201442)
at _0x2f86bf (https://github7ls6muoe-103g.w-corp-staticblitz.com/blitz.d20a0a75.js:40:510963)
at _0x5a9943 (https://github7ls6muoe-103g.w-corp-staticblitz.com/blitz.d20a0a75.js:40:514536)
During development everything works as expected.
Not sure if this is related to Vercels adapter or not as the process fails after [build] Waiting for integration "@astrojs/vercel", hook "astro:build:done"....
Astro Info
Describe the Bug
When using any
node:*
module in the middleware the build process with configuration:fails with:
During development everything works as expected.
Not sure if this is related to Vercels adapter or not as the process fails after
[build] Waiting for integration "@astrojs/vercel", hook "astro:build:done"...
.What's the expected result?
Build completion
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-7ls6muoe
Participation
The text was updated successfully, but these errors were encountered: