svelte-adapter-azure-swa
svelte-adapter-azure-swa copied to clipboard
Unable to build app with pnpm
Installing the adapter in a fresh demo project with pnpm and running pnpm build throws the following error:
> Using adapter-azure-swa
✘ [ERROR] Could not resolve "set-cookie-parser"
.svelte-kit/azure-tmp/headers.js:1:35:
1 │ import * as set_cookie_parser from 'set-cookie-parser';
╵ ~~~~~~~~~~~~~~~~~~~
You can mark the path "set-cookie-parser" as external to exclude it from the
bundle, which will remove this error.
error during build:
Error: Build failed with 1 error:
.svelte-kit/azure-tmp/headers.js:1:35: ERROR: Could not resolve "set-cookie-parser"
at failureErrorWithLog (/Users/grich/code/throwaway/pnpm-test/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1575:15)
at /Users/grich/code/throwaway/pnpm-test/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1033:28
at /Users/grich/code/throwaway/pnpm-test/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:978:67
at buildResponseToResult (/Users/grich/code/throwaway/pnpm-test/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1031:7)
at /Users/grich/code/throwaway/pnpm-test/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1143:14
at responseCallbacks.<computed> (/Users/grich/code/throwaway/pnpm-test/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:680:9)
at handleIncomingPacket (/Users/grich/code/throwaway/pnpm-test/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:735:9)
at Socket.readFromStdout (/Users/grich/code/throwaway/pnpm-test/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:656:7)
at Socket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:315:12)
ELIFECYCLE Command failed with exit code 1.
More context: https://github.com/geoffrich/svelte-adapter-azure-swa/issues/118
The official Netlify adapter uses the same set-cookie-parser dependency and builds successfully, so I'm not sure what we're doing differently.
#133 links this issue in the README. We should remove that line once the issue is resolved.
Noticed this too. It is weird since the package.json seems to be all good. Currently been working around this by just installing set-cookie-parser with the adapter package
pnpm i -D set-cookie-parser