sveltejs / kit

web development, streamlined
https://kit.svelte.dev
MIT License
18.42k stars 1.88k forks source link

Can't SvelteKit app on Vercel #4755

Closed Sammy-Nyakabau closed 1 year ago

Sammy-Nyakabau commented 2 years ago

Describe the bug

Tried deploying on Vercel but the build part is failing because of output directory. Vercel is expecting public to be the output directory.

Reproduction

Unfortunately I can't provide a link to the repo since it is a private project

Logs

[02:37:12.273] Cloning github.com/Freelance-Gigs/college-finder-app (Branch: develop, Commit: c903ffe)
[02:37:12.865] Cloning completed: 591.79ms
[02:37:12.964] Installing build runtime...
[02:37:14.798] Build runtime installed: 1.834s
[02:37:15.941] No Build Cache available
[02:37:16.086] Detected package.json
[02:37:16.086] Installing dependencies...
[02:37:16.088] Detected `package-lock.json` generated by npm 7...
[02:37:22.433] 
[02:37:22.433] > college-finder-app@1.0.0 prepare
[02:37:22.433] > svelte-kit sync
[02:37:22.433] 
[02:37:22.577] 
[02:37:22.578] added 237 packages in 6s
[02:37:22.578] 
[02:37:22.578] 39 packages are looking for funding
[02:37:22.578]   run `npm fund` for details
[02:37:22.785] Detected `package-lock.json` generated by npm 7...
[02:37:22.785] Running "npm run build"
[02:37:23.065] 
[02:37:23.065] > college-finder-app@1.0.0 build
[02:37:23.065] > svelte-kit build
[02:37:23.065] 
[02:37:23.384] vite v2.9.6 building for production...
[02:37:23.486] transforming...
[02:37:29.268] ✓ 208 modules transformed.
[02:37:29.445] rendering chunks...
[02:37:29.590] .svelte-kit/output/client/_app/manifest.json                                        2.11 KiB
[02:37:29.591] .svelte-kit/output/client/_app/pages/__layout.svelte-4032d3ea.js                    2.39 KiB / gzip: 1.16 KiB
[02:37:29.594] .svelte-kit/output/client/_app/error.svelte-efb7648d.js                             1.56 KiB / gzip: 0.75 KiB
[02:37:29.595] .svelte-kit/output/client/_app/pages/index.svelte-afc64a48.js                       9.18 KiB / gzip: 3.37 KiB
[02:37:29.595] .svelte-kit/output/client/_app/chunks/index-e09e217c.js                             0.80 KiB / gzip: 0.49 KiB
[02:37:29.595] .svelte-kit/output/client/_app/chunks/singletons-d1fb5791.js                        0.05 KiB / gzip: 0.07 KiB
[02:37:29.595] .svelte-kit/output/client/_app/start-54dcabb1.js                                    23.25 KiB / gzip: 8.65 KiB
[02:37:29.595] .svelte-kit/output/client/_app/chunks/navigation-73ae68f0.js                        1.06 KiB / gzip: 0.69 KiB
[02:37:29.595] .svelte-kit/output/client/_app/chunks/index-087532fe.js                             12.40 KiB / gzip: 5.06 KiB
[02:37:29.596] .svelte-kit/output/client/_app/assets/pages/find-college/_id_.svelte-f29ff347.css   45.33 KiB / gzip: 6.79 KiB
[02:37:29.596] .svelte-kit/output/client/_app/assets/pages/__layout.svelte-251776ad.css            12.23 KiB / gzip: 3.35 KiB
[02:37:29.601] .svelte-kit/output/client/_app/pages/find-college/_id_.svelte-15bce451.js           252.70 KiB / gzip: 83.33 KiB
[02:37:29.612] vite v2.9.6 building SSR bundle for production...
[02:37:29.745] transforming...
[02:37:30.017] ✓ 14 modules transformed.
[02:37:30.018] [rollup-plugin-dynamic-import-variables] Argument name clash (79:132)
[02:37:30.018] file: /vercel/path0/src/components/ProfileInformation.svelte:79:132
[02:37:30.020] (node:442) UnhandledPromiseRejectionWarning: SyntaxError: Argument name clash (79:132)
[02:37:30.021]     at Parser.pp$4.raise (/vercel/path0/node_modules/rollup/dist/shared/rollup.js:19680:13)
[02:37:30.021]     at Parser.pp$7.checkLValSimple (/vercel/path0/node_modules/rollup/dist/shared/rollup.js:18353:18)
[02:37:30.021]     at Parser.pp$7.checkLValPattern (/vercel/path0/node_modules/rollup/dist/shared/rollup.js:18398:10)
[02:37:30.021]     at Parser.pp$7.checkLValInnerPattern (/vercel/path0/node_modules/rollup/dist/shared/rollup.js:18420:10)
[02:37:30.021]     at Parser.pp$5.checkParams (/vercel/path0/node_modules/rollup/dist/shared/rollup.js:19533:10)
[02:37:30.021]     at Parser.pp$5.parseFunctionBody (/vercel/path0/node_modules/rollup/dist/shared/rollup.js:19503:10)
[02:37:30.021]     at Parser.pp$5.parseArrowExpression (/vercel/path0/node_modules/rollup/dist/shared/rollup.js:19467:8)
[02:37:30.021]     at Parser.pp$5.parseParenArrowList (/vercel/path0/node_modules/rollup/dist/shared/rollup.js:19196:15)
[02:37:30.021]     at Parser.pp$5.parseParenAndDistinguishExpression (/vercel/path0/node_modules/rollup/dist/shared/rollup.js:19162:19)
[02:37:30.021]     at Parser.pp$5.parseExprAtom (/vercel/path0/node_modules/rollup/dist/shared/rollup.js:19014:41)
[02:37:30.021] (Use `node --trace-warnings ...` to show where the warning was created)
[02:37:30.022] (node:442) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
[02:37:30.022] (node:442) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[02:37:30.695] Error: No Output Directory named "public" found after the Build completed. You can configure the Output Directory in your Project Settings. Learn More: https://vercel.link/missing-public-directory

System Info

System:
    OS: macOS 12.3
    CPU: (8) x64 Apple M1
    Memory: 38.69 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.17.3 - /usr/local/bin/node
    Yarn: 1.22.15 - /usr/local/bin/yarn
    npm: 8.5.5 - /usr/local/bin/npm
  Browsers:
    Chrome: 100.0.4896.127
    Safari: 15.4
  npmPackages:
    @sveltejs/adapter-auto: next => 1.0.0-next.39 
    @sveltejs/kit: next => 1.0.0-next.322 
    svelte: ^3.47.0 => 3.47.0

Severity

blocking all usage of SvelteKit

Additional Information

No response

Conduitry commented 2 years ago

We can't properly diagnose anything without a reproduction. It doesn't matter whether you can share the project you are having this issue with, because you should be providing a minimal, stripped-down reproduction anyway.

From the error message, it looks like there is some bad interaction between rollup-plugin-dynamic-import-variables and the contents of your src/components/ProfileInformation.svelte file.

Conduitry commented 2 years ago

Closing due to lack of proper reproduction.

frontycore commented 2 years ago

Hi, I have similar issue with Svelte Kit and Vercel. I migrated my app from Sapper to Svelte Kit, but now I am not able to publish it on Vercel, because the public directory is not created. I tried to set public dir to .svelte-kit, in this case build ends successfully, but there is "Not found" error. Then I tried to set .svelte-kit/build to public dir, deployed successfully, but there was raw JS code shown on production URL. I also tried to set Vercel adapter rather than Auto, the result was the same. Lastly I cloned the default SvelteKit project with Vercel template to https://sveltekit-git-main-ondrej2.vercel.app/ and compare it's Vercel settings and svelte config, both are the same as in my project. Both Dev and Preview mode works fine on localhost. Attaching build report.

What do I do wrong? Thanks for any advice or clue!

Cloning bitbucket.org/ondrejseliga/kvitkova-frontend (Branch: master, Commit: a43289c)

05:19:15.806 | Cloning completed: 1.620s 05:19:16.760 | Looking up build cache... 05:19:18.158 | Build cache downloaded [19.82 MB]: 1062.339ms 05:19:18.406 | Running "vercel build" 05:19:18.881 | Vercel CLI 25.2.2 build (beta) — https://vercel.com/feedback 05:19:18.964 | > Loaded env from ".env" 05:19:19.101 | Installing dependencies... 05:19:20.280 |   05:19:20.280 | up to date in 985ms 05:19:20.281 |   05:19:20.281 | 65 packages are looking for funding 05:19:20.281 | run npm fund for details 05:19:20.521 | Detected package-lock.json generated by npm 7... 05:19:20.521 | Running "npm run build" 05:19:20.816 |   05:19:20.816 | > sveltheme-frontend@0.0.1 build 05:19:20.816 | > svelte-kit build 05:19:20.816 |   05:19:21.519 | vite v2.9.13 building for production... 05:19:21.620 | transforming... 05:19:26.681 | ✓ 121 modules transformed. 05:19:26.853 | rendering chunks... 05:19:26.955 | Client build completed. Wrote 32 chunks and 13 assets 05:19:26.956 | Building server 05:19:26.967 | .svelte-kit/output/client/_app/immutable/manifest.json 9.28 KiB 05:19:26.974 | .svelte-kit/output/client/_app/immutable/pages/error.svelte-e37688ae.js 1.51 KiB / gzip: 0.85 KiB 05:19:26.974 | .svelte-kit/output/client/_app/immutable/pages/byty/index.svelte-528d80c7.js 12.15 KiB / gzip: 4.53 KiB 05:19:26.974 | .svelte-kit/output/client/_app/immutable/start-720e9f66.js 26.00 KiB / gzip: 8.98 KiB 05:19:26.974 | .svelte-kit/output/client/_app/immutable/pages/byty/slug.svelte-a944859e.js 15.50 KiB / gzip: 4.75 KiB 05:19:26.975 | .svelte-kit/output/client/_app/immutable/pages/slug.svelte-b00128e7.js 2.41 KiB / gzip: 1.18 KiB 05:19:26.975 | .svelte-kit/output/client/_app/immutable/pages/patra/index.svelte-b6ef8fdf.js 0.22 KiB / gzip: 0.19 KiB 05:19:26.975 | .svelte-kit/output/client/_app/immutable/pages/hledat/search.svelte-9d5ea335.js 9.12 KiB / gzip: 3.41 KiB 05:19:26.975 | .svelte-kit/output/client/_app/immutable/pages/tirata_admin.svelte-86c49d89.js 0.25 KiB / gzip: 0.21 KiB 05:19:26.975 | .svelte-kit/output/client/_app/immutable/pages/patra/slug.svelte-a9abbd88.js 2.91 KiB / gzip: 1.34 KiB 05:19:26.975 | .svelte-kit/output/client/_app/immutable/chunks/preload-helper-37d74a8a.js 1.34 KiB / gzip: 0.81 KiB 05:19:26.976 | .svelte-kit/output/client/_app/immutable/chunks/singletons-d1fb5791.js 0.05 KiB / gzip: 0.07 KiB 05:19:26.976 | .svelte-kit/output/client/_app/immutable/chunks/Link-c28b6159.js 1.36 KiB / gzip: 0.80 KiB 05:19:26.976 | .svelte-kit/output/client/_app/immutable/pages/layout.svelte-3a1e64c8.js 25.22 KiB / gzip: 9.33 KiB 05:19:26.976 | .svelte-kit/output/client/_app/immutable/chunks/navigation-fe373893.js 0.19 KiB / gzip: 0.16 KiB 05:19:26.976 | .svelte-kit/output/client/_app/immutable/pages/index.svelte-a7905201.js 24.70 KiB / gzip: 7.36 KiB 05:19:26.976 | .svelte-kit/output/client/_app/immutable/chunks/html-3a706857.js 14.49 KiB / gzip: 5.25 KiB 05:19:26.978 | .svelte-kit/output/client/_app/immutable/chunks/Head-bb57bc87.js 4.92 KiB / gzip: 1.91 KiB 05:19:26.978 | .svelte-kit/output/client/_app/immutable/chunks/api-97e42fa3.js 0.34 KiB / gzip: 0.27 KiB 05:19:26.978 | .svelte-kit/output/client/_app/immutable/chunks/Content-4ecae4a6.js 1.51 KiB / gzip: 0.89 KiB 05:19:26.978 | .svelte-kit/output/client/_app/immutable/chunks/index-5fcc941d.js 13.77 KiB / gzip: 5.69 KiB 05:19:26.978 | .svelte-kit/output/client/_app/immutable/chunks/PageHeader-f9df1552.js 1.75 KiB / gzip: 0.93 KiB 05:19:26.979 | .svelte-kit/output/client/_app/immutable/chunks/index-41cb2848.js 0.21 KiB / gzip: 0.18 KiB 05:19:26.981 | .svelte-kit/output/client/_app/immutable/chunks/ContactForm-d071d62f.js 8.54 KiB / gzip: 3.20 KiB 05:19:26.981 | .svelte-kit/output/client/_app/immutable/chunks/Image-10ee6886.js 3.08 KiB / gzip: 1.52 KiB 05:19:26.981 | .svelte-kit/output/client/_app/immutable/chunks/msg-8e250072.js 0.63 KiB / gzip: 0.38 KiB 05:19:26.981 | .svelte-kit/output/client/_app/immutable/chunks/search-52439ac6.js 0.12 KiB / gzip: 0.11 KiB 05:19:26.981 | .svelte-kit/output/client/_app/immutable/chunks/appartment-3cbab68c.js 1.23 KiB / gzip: 0.65 KiB 05:19:26.981 | .svelte-kit/output/client/_app/immutable/chunks/form-7160d3e5.js 0.50 KiB / gzip: 0.34 KiB 05:19:26.982 | .svelte-kit/output/client/_app/immutable/chunks/StoreyTable-dddd304a.js 13.87 KiB / gzip: 4.55 KiB 05:19:26.982 | .svelte-kit/output/client/_app/immutable/assets/Content-a453a534.css 3.97 KiB / gzip: 1.02 KiB 05:19:26.982 | .svelte-kit/output/client/_app/immutable/assets/PageHeader-30a9babd.css 0.79 KiB / gzip: 0.36 KiB 05:19:26.982 | .svelte-kit/output/client/_app/immutable/assets/pages/byty/slug.svelte-3d7d7816.css 0.71 KiB / gzip: 0.25 KiB 05:19:26.982 | .svelte-kit/output/client/_app/immutable/assets/ContactForm-1744c588.css 1.58 KiB / gzip: 0.59 KiB 05:19:26.982 | .svelte-kit/output/client/_app/immutable/assets/pages/byty/index.svelte-9c977832.css 1.40 KiB / gzip: 0.51 KiB 05:19:26.982 | .svelte-kit/output/client/_app/immutable/assets/StoreyTable-43c8d0c5.css 2.32 KiB / gzip: 0.66 KiB 05:19:26.982 | .svelte-kit/output/client/_app/immutable/assets/pages/hledat/search.svelte-cd9417a4.css 0.34 KiB / gzip: 0.21 KiB 05:19:26.982 | .svelte-kit/output/client/_app/immutable/assets/pages/patra/slug.svelte-e7f619b3.css 0.08 KiB / gzip: 0.09 KiB 05:19:26.982 | .svelte-kit/output/client/_app/immutable/assets/StoreyPlan-0cc44fde.css 1.63 KiB / gzip: 0.29 KiB 05:19:26.982 | .svelte-kit/output/client/_app/immutable/assets/pages/index.svelte-98ac8067.css 8.64 KiB / gzip: 2.10 KiB 05:19:26.983 | .svelte-kit/output/client/_app/immutable/chunks/glightbox.min-5144f092.js 40.16 KiB / gzip: 11.79 KiB 05:19:26.983 | .svelte-kit/output/client/_app/immutable/assets/pages/layout.svelte-d8eb1f57.css 54.10 KiB / gzip: 9.51 KiB 05:19:26.983 | .svelte-kit/output/client/_app/immutable/assets/guttenberg-cb1d187c.css 53.80 KiB / gzip: 8.15 KiB 05:19:26.983 | .svelte-kit/output/client/_app/immutable/chunks/splide.esm-99cdbe39.js 39.32 KiB / gzip: 16.12 KiB 05:19:26.996 | .svelte-kit/output/client/_app/immutable/chunks/StoreyPlan-1b145892.js 244.20 KiB / gzip: 37.81 KiB 05:19:27.003 | vite v2.9.13 building SSR bundle for production... 05:19:27.184 | transforming... 05:19:29.062 | ✓ 117 modules transformed. 05:19:29.102 | Generated an empty chunk: "hooks" 05:19:29.115 | rendering chunks... 05:19:29.163 | .svelte-kit/output/server/manifest.json 7.47 KiB 05:19:29.164 | .svelte-kit/output/server/index.js 73.58 KiB 05:19:29.164 | .svelte-kit/output/server/entries/endpoints/sitemap.xml.js 0.90 KiB 05:19:29.164 | .svelte-kit/output/server/entries/pages/layout.svelte.js 127.12 KiB 05:19:29.164 | .svelte-kit/output/server/entries/pages/__error.svelte.js 0.98 KiB 05:19:29.165 | .svelte-kit/output/server/entries/pages/slug.svelte.js 1.69 KiB 05:19:29.165 | .svelte-kit/output/server/entries/pages/byty/slug.svelte.js 8.83 KiB 05:19:29.165 | .svelte-kit/output/server/entries/pages/byty/index.svelte.js 9.13 KiB 05:19:29.165 | .svelte-kit/output/server/entries/pages/hledat/search.svelte.js 6.86 KiB 05:19:29.165 | .svelte-kit/output/server/entries/pages/index.svelte.js 27.13 KiB 05:19:29.165 | .svelte-kit/output/server/entries/pages/patra/slug.svelte.js 2.36 KiB 05:19:29.165 | .svelte-kit/output/server/entries/pages/patra/index.svelte.js 0.30 KiB 05:19:29.165 | .svelte-kit/output/server/entries/pages/tirata_admin.svelte.js 0.35 KiB 05:19:29.165 | .svelte-kit/output/server/chunks/index-b60f7d7e.js 7.23 KiB 05:19:29.165 | .svelte-kit/output/server/chunks/api-97e42fa3.js 0.62 KiB 05:19:29.165 | .svelte-kit/output/server/chunks/html-0300acf0.js 1.34 KiB 05:19:29.165 | .svelte-kit/output/server/chunks/stores-f0be75ae.js 20.85 KiB 05:19:29.166 | .svelte-kit/output/server/chunks/Link-feeb5af9.js 1.13 KiB 05:19:29.166 | .svelte-kit/output/server/chunks/Head-8555753a.js 4.69 KiB 05:19:29.166 | .svelte-kit/output/server/chunks/Content-4ac3e065.js 9.04 KiB 05:19:29.166 | .svelte-kit/output/server/chunks/PageHeader-3d976e70.js 3.02 KiB 05:19:29.166 | .svelte-kit/output/server/chunks/ContactForm-2a06d660.js 7.72 KiB 05:19:29.166 | .svelte-kit/output/server/chunks/Image-85293e22.js 3.91 KiB 05:19:29.166 | .svelte-kit/output/server/chunks/StoreyPlan-ff1a9c8c.js 230.19 KiB 05:19:29.166 | .svelte-kit/output/server/chunks/StoreyTable-0fb1a4f2.js 10.72 KiB 05:19:29.166 | .svelte-kit/output/server/chunks/hooks-1c45ba0b.js 0.00 KiB 05:19:29.166 | .svelte-kit/output/server/chunks/msg-8e250072.js 0.73 KiB 05:19:29.166 | .svelte-kit/output/server/chunks/form-7160d3e5.js 0.60 KiB 05:19:29.167 | .svelte-kit/output/server/chunks/search-52439ac6.js 0.15 KiB 05:19:29.167 | .svelte-kit/output/server/chunks/appartment-3cbab68c.js 1.59 KiB 05:19:29.167 | Prerendering 05:19:29.202 | Building service worker 05:19:29.212 | vite v2.9.13 building for production... 05:19:29.214 | transforming... 05:19:29.218 | ✓ 2 modules transformed. 05:19:29.222 | rendering chunks... 05:19:29.223 | .svelte-kit/output/client/service-worker.js 5.88 KiB / gzip: 1.63 KiB 05:19:29.223 |   05:19:29.223 | Run npm run preview to preview your production build locally. 05:19:29.224 |   05:19:29.224 | No adapter specified 05:19:29.224 | See https://kit.svelte.dev/docs/adapters to learn how to configure your app to run on the platform of your choosing 05:19:29.312 | Error! No Output Directory named "public" found after the Build completed. You can configure the Output Directory in your Project Settings. 05:19:29.312 | Learn More: https://vercel.link/missing-public-directory 05:19:29.421 | Error: Command "vercel build" exited with 1

oneezy commented 2 years ago

@frontycore similar case on this end. I had this working fine at one point and something changed. Did you ever find a solution?

I created an issue on my repo i'll link here as well: https://github.com/oneezy/monorepo/issues/1

@Conduitry can we reopen this? seems to be affecting a few people

Zamiell commented 2 years ago

I started a brand new SvelteKit project and attempted to deploy it to Vercel, and I got the error that the OP describes about a missing public directory.

It turns out that the problem was because I had configured it to use the Node.js adapter, as specified in the SvelteKit docs. (I had done this so that I could test out a deployment on my local computer.)

So, if this is happening to you, the solution is to convert your project back to the adapter-auto and remove the out field from the adapter argument.

oneezy commented 2 years ago

@Zamiell what do you mean when you say "remove the out field from the adapter argument"?

Still unable to resolve the issue on my end but I'm using Turborepo + Sveltekit.

Zamiell commented 2 years ago

what do you mean when you say "remove the out field from the adapter argument"?

Read Svelte docs and look what they say:

image

For node.js, they recommend making these two changes, which includes adding an "out" field. So, if you want to deploy to Vercel, you have to remember to revert these changes back to the hello-world default.

madeleineostoja commented 2 years ago

I'm also seeing this on Vercel from upgrading to the latest version of sveltekit, which is a regression from a successful deployment a few days ago. I feel like this issue should be reopened until the cause is pinned down

madeleineostoja commented 2 years ago

FWIW my issue was that I was sharing vite config in a monorepo, and importing { sveltekit } from '@sveltejs/kit/vite' from the shared config rather than the project caused the adapter to not run. Might be worth documenting that that has to be imported from the project root in a monorepo env.

Otherwise this can probably be closed out again, sorry for the false alarm!

oneezy commented 2 years ago

that's likely what my issue is @madeleineostoja thanks for the tip. do you have that code in a repo anywhere? I'm about to give it a try

here's what my monorepo setup looks like

image

EDIT: Can confirm @madeleineostoja 's solution working on my end. I just copied my shared packages/config/vite.config.js into my apps/site/vite.config.js and it worked like a charm. Kind of irritating but it works

image

madeleineostoja commented 2 years ago

All you need to do is pass the apps sveltekit plug-in to your shared config, no need to copy n paste the whole thing

oneezy commented 2 years ago

All you need to do is pass the apps sveltekit plug-in to your shared config, no need to copy n paste the whole thing

I actually tried that but didn't work on first go. like this right?

import { viteConfig } from '@packages/config';
import { sveltekit } from '@sveltejs/kit/vite';

/** @type {import('vite').UserConfig} */
const config = {
  ...viteConfig,

  plugins: [
     sveltekit(),
  ],
};

export default config;
dummdidumm commented 1 year ago

Closing again since it seems the issue is resolved/unrelated. Not sure where and how to document that monorepo caveat best (probably not inside the Vercel adapter, this is likely something more general) - ideas welcome.

madeleineostoja commented 1 year ago

Could you have a “working with monorepos” section in the general docs under advanced? It’d be a small section but probably worthwhile

Could also flag the gotcha that it’s currently not possible to extend sveltekit tsconfig if you have a shared tsconfig for the monorepo

oneezy commented 1 year ago

"Could you have a “working with monorepos” section in the general docs under advanced? It’d be a small section but probably worthwhile"

@madeleineostoja @dummdidumm I second that !

Would also be cool to see a Svelte #monorepo discord channel but not holding my breath. Looks like svelte discord has been downsizing.

There is a Turborepo #svelte discord channel but it doesn't get much love.


For anyone seeing this, we've made a ton of progress in our Turborepo + Sveltekit + Tailwind + Histoire starter (oneezy/monorepo).

Contributions and Issue fixin' are always welcome 😄

coryvirok commented 1 year ago

Copying from https://github.com/oneezy/monorepo/issues/1#issuecomment-1441117634 in case anyone else is using Turbo + Vercel + Sveltekit.

----->%-------

thought i'd just leave this here since i was having the same issue and this was the first result: if you're using turborepo, don't forget the .vercel/ directory in the build output!

"pipeline": {
  "build": {
    "dependsOn": [...]
-   "outputs": [..., ".svelte-kit/**"],
+   "outputs": [..., ".svelte-kit/**", ".vercel/**"],
    ...
  },
}
braden-w commented 2 months ago

@coryvirok answer solved my issue! Just a heads up, now in Turborepo v2, pipeline has been renamed to "tasks", so the new turbo.json would be:

"tasks": {
  "build": {
    "dependsOn": [...]
-   "outputs": [..., ".svelte-kit/**"],
+   "outputs": [..., ".svelte-kit/**", ".vercel/**"],
    ...
  },
}
hugotox commented 2 months ago

I'm trying to update turborepo from 1.13.3 to 2.0.6 and started seeing this issue. My tasks config has the correct output, and the project in vercel is using default settings.

What seems confusing to me is in vercel the default settings say "public" so why is my project working fine with turbo 1 and the same output from turbo?

image