sveltejs / kit

web development, streamlined
https://svelte.dev/docs/kit
MIT License
18.66k stars 1.92k forks source link

It says "Output directory ".svelte-kit/cloudflare" not found." when I try to deploy to cloudflare #5409

Closed leomick closed 2 years ago

leomick commented 2 years ago

Describe the bug

Everything is up to date and I followed the instructions for the cloudflare adapter.

Reproduction

Just listen to the instructions on https://github.com/sveltejs/kit/tree/master/packages/adapter-vercel and use a github repository

Logs

2022-07-07T21:59:09.841863Z Cloning repository...
2022-07-07T21:59:10.685379Z From https://github.com/CloudyWhale/personal-website
2022-07-07T21:59:10.685868Z  * branch            e7f04915a7b3203c6657c9bec8487193642dffdc -> FETCH_HEAD
2022-07-07T21:59:10.686042Z 
2022-07-07T21:59:10.727409Z HEAD is now at e7f0491 install cloudflare thingy
2022-07-07T21:59:10.72793Z  
2022-07-07T21:59:10.86167Z  
2022-07-07T21:59:10.886282Z Success: Finished cloning repository files
2022-07-07T21:59:11.680927Z Installing dependencies
2022-07-07T21:59:11.691665Z Python version set to 2.7
2022-07-07T21:59:15.389175Z Downloading and installing node v16.16.0...
2022-07-07T21:59:15.768382Z Downloading https://nodejs.org/dist/v16.16.0/node-v16.16.0-linux-x64.tar.xz...
2022-07-07T21:59:16.262786Z Computing checksum with sha256sum
2022-07-07T21:59:16.39079Z  Checksums matched!
2022-07-07T21:59:20.602126Z Now using node v16.16.0 (npm v8.11.0)
2022-07-07T21:59:20.96071Z  Started restoring cached build plugins
2022-07-07T21:59:20.973214Z Finished restoring cached build plugins
2022-07-07T21:59:21.432901Z Attempting ruby version 2.7.1, read from environment
2022-07-07T21:59:24.897426Z Using ruby version 2.7.1
2022-07-07T21:59:25.254371Z Using PHP version 5.6
2022-07-07T21:59:25.406498Z 5.2 is already installed.
2022-07-07T21:59:25.43243Z  Using Swift version 5.2
2022-07-07T21:59:25.43299Z  Started restoring cached node modules
2022-07-07T21:59:25.448486Z Finished restoring cached node modules
2022-07-07T21:59:25.947405Z Installing NPM modules using NPM version 8.11.0
2022-07-07T21:59:26.353874Z npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
2022-07-07T21:59:26.354229Z npm WARN config location in the cache, and they are managed by
2022-07-07T21:59:26.354402Z npm WARN config     [`cacache`](http://npm.im/cacache).
2022-07-07T21:59:26.755337Z npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
2022-07-07T21:59:26.755771Z npm WARN config location in the cache, and they are managed by
2022-07-07T21:59:26.756025Z npm WARN config     [`cacache`](http://npm.im/cacache).
2022-07-07T21:59:32.124088Z 
2022-07-07T21:59:32.124513Z > tailwind-svelte@0.0.1 prepare
2022-07-07T21:59:32.124761Z > svelte-kit sync
2022-07-07T21:59:32.124916Z 
2022-07-07T21:59:32.321244Z 
2022-07-07T21:59:32.321645Z added 189 packages, and audited 190 packages in 6s
2022-07-07T21:59:32.321879Z 
2022-07-07T21:59:32.322057Z 23 packages are looking for funding
2022-07-07T21:59:32.322289Z   run `npm fund` for details
2022-07-07T21:59:32.323266Z 
2022-07-07T21:59:32.323479Z found 0 vulnerabilities
2022-07-07T21:59:32.335299Z NPM modules installed
2022-07-07T21:59:32.900675Z npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
2022-07-07T21:59:32.900991Z npm WARN config location in the cache, and they are managed by
2022-07-07T21:59:32.901154Z npm WARN config     [`cacache`](http://npm.im/cacache).
2022-07-07T21:59:32.920924Z Installing Hugo 0.54.0
2022-07-07T21:59:33.598863Z Hugo Static Site Generator v0.54.0-B1A82C61A/extended linux/amd64 BuildDate: 2019-02-01T10:04:38Z
2022-07-07T21:59:33.603253Z Started restoring cached go cache
2022-07-07T21:59:33.621569Z Finished restoring cached go cache
2022-07-07T21:59:33.772505Z go version go1.14.4 linux/amd64
2022-07-07T21:59:33.78599Z  go version go1.14.4 linux/amd64
2022-07-07T21:59:33.789002Z Installing missing commands
2022-07-07T21:59:33.78925Z  Verify run directory
2022-07-07T21:59:33.789438Z Executing user command: npm run build
2022-07-07T21:59:34.260052Z npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
2022-07-07T21:59:34.260397Z npm WARN config location in the cache, and they are managed by
2022-07-07T21:59:34.260598Z npm WARN config     [`cacache`](http://npm.im/cacache).
2022-07-07T21:59:34.276244Z 
2022-07-07T21:59:34.276495Z > tailwind-svelte@0.0.1 build
2022-07-07T21:59:34.276635Z > vite build
2022-07-07T21:59:34.276749Z 
2022-07-07T21:59:34.698163Z The following Vite config options will be overridden by SvelteKit:
2022-07-07T21:59:34.698789Z   - root
2022-07-07T21:59:34.718882Z vite v2.9.13 building for production...
2022-07-07T21:59:34.836101Z transforming...
2022-07-07T21:59:36.365653Z ✓ 14 modules transformed.
2022-07-07T21:59:36.419151Z rendering chunks...
2022-07-07T21:59:36.440902Z ../.svelte-kit/output/client/_app/immutable/manifest.json                            1.22 KiB
2022-07-07T21:59:36.441356Z [vite-plugin-svelte-kit] Cannot read properties of undefined (reading 'file')
2022-07-07T21:59:36.465612Z Finished
2022-07-07T21:59:36.46628Z  Note: No functions dir at /functions found. Skipping.
2022-07-07T21:59:36.466545Z Validating asset output directory
2022-07-07T21:59:36.466886Z Error: Output directory ".svelte-kit/cloudflare" not found.
2022-07-07T21:59:37.349395Z Failed: build output directory not found

System Info

The issue is happening on cloudflare's servers I do not know there system info

Severity

blocking all usage of SvelteKit

Additional Information

I can't deploy my website if this is happening

leomick commented 2 years ago

I have never used cloudflare before so if you can explain it simply that would be appreceated

leomick commented 2 years ago

Here is my project source: https://github.com/CloudyWhale/personal-website. This is so you can tell me if it is an issue with my vite config

Rich-Harris commented 2 years ago

remove these lines and try again https://github.com/CloudyWhale/personal-website/blob/e7f04915a7b3203c6657c9bec8487193642dffdc/vite.config.js#L6-L9

leomick commented 2 years ago

Thanks! This worked.

leomick commented 2 years ago

I added a folder to the allow list and it is happening again now