Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build app with pnpm #135

Open
geoffrich opened this issue Mar 23, 2023 · 2 comments
Open

Unable to build app with pnpm #135

geoffrich opened this issue Mar 23, 2023 · 2 comments

Comments

@geoffrich
Copy link
Owner

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: #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.

@geoffrich
Copy link
Owner Author

#133 links this issue in the README. We should remove that line once the issue is resolved.

@bertybot
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants