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

@sveltejs/adapter-vercel not working anymore at vercel.com #3143

Closed
seppegadeyne opened this issue Dec 30, 2021 · 19 comments
Closed

@sveltejs/adapter-vercel not working anymore at vercel.com #3143

seppegadeyne opened this issue Dec 30, 2021 · 19 comments
Labels
bug Something isn't working pkg:adapter-vercel Pertaining to the Vercel adapter
Milestone

Comments

@seppegadeyne
Copy link

Describe the bug

I have several SvelteKit websites hosted at vercel.com using @sveltejs/adapter-vercel. Since today (30/12/2021) deploys are not working anymore. If you run "npm run build" locally it works fine. Not on vercel itself.

Screenshot from 2021-12-30 20-31-11

Reproduction

Try to deploy on vercel.

Logs

No response

System Info

System:
    OS: Linux 5.11 Ubuntu 20.04.3 LTS (Focal Fossa)
    CPU: (16) x64 AMD Ryzen 9 5900HX with Radeon Graphics
    Memory: 42.46 GB / 62.71 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 16.13.1 - ~/.nvm/versions/node/v16.13.1/bin/node
    npm: 8.1.4 - ~/.nvm/versions/node/v16.13.1/bin/npm
  Browsers:
    Chrome: 98.0.4758.9
  npmPackages:
    @glidejs/glide: ^3.5.2 => 3.5.2 
    @sveltejs/adapter-vercel: next => 1.0.0-next.32 
    @sveltejs/kit: next => 1.0.0-next.201 
    @tailwindcss/aspect-ratio: ^0.4.0 => 0.4.0 
    @tailwindcss/forms: ^0.4.0 => 0.4.0 
    @types/glidejs__glide: ^3.4.1 => 3.4.1 
    @typescript-eslint/eslint-plugin: ^4.31.1 => 4.33.0 
    @typescript-eslint/parser: ^4.31.1 => 4.33.0 
    autoprefixer: ^10.4.0 => 10.4.0 
    cssnano: ^5.0.6 => 5.0.12 
    eslint: ^7.32.0 => 7.32.0 
    eslint-plugin-svelte3: ^3.2.0 => 3.2.1 
    motion: ^10.4.0 => 10.4.0 
    postcss: ^8.4.5 => 8.4.5 
    postcss-load-config: ^3.1.0 => 3.1.0 
    sanitize-html: ^2.5.3 => 2.6.0 
    storyblok-js-client: ^4.1.5 => 4.1.5 
    svelte: ^3.38.2 => 3.44.2 
    svelte-check: ^2.2.6 => 2.2.10 
    svelte-preprocess: ^4.7.3 => 4.9.8 
    tailwind-scrollbar-hide: ^1.0.3 => 1.1.6 
    tailwindcss: ^3.0.2 => 3.0.2 
    tslib: ^2.3.1 => 2.3.1 
    typescript: ^4.5.2 => 4.5.2

Severity

blocking all usage of SvelteKit

Additional Information

No response

@seppegadeyne
Copy link
Author

please check below....

Screenshot from 2021-12-30 20-37-19

@Rich-Harris
Copy link
Member

Investigating

@benmccann benmccann added bug Something isn't working pkg:adapter-vercel Pertaining to the Vercel adapter labels Dec 30, 2021
@benmccann benmccann added this to the 1.0 milestone Dec 30, 2021
@Rich-Harris
Copy link
Member

Can you try with @sveltejs/adapter-vercel@1.0.0-next.34?

@seppegadeyne
Copy link
Author

same error message with version 34...

Screenshot from 2021-12-30 21-48-37

@HeritagePalms
Copy link

Can you try with @sveltejs/adapter-vercel@1.0.0-next.34?

This got me back in working order.

@Rich-Harris
Copy link
Member

Oh, hang on — you're referencing $page.path. That won't work any more: #3126

The error that would have told you that is only printed in dev mode. Perhaps we should add it to prod mode too.

@Rich-Harris
Copy link
Member

(Change $path.path to $page.url.pathname and $page.query to $page.url.searchParams, and the same for any uses of page.path and page.query in load functions, or request.path/request.query in endpoints)

@HeritagePalms
Copy link

HeritagePalms commented Dec 30, 2021

(Change $path.path to $page.url.pathname and $page.query to $page.url.searchParams, and the same for any uses of page.path and page.query in load functions, or request.path/request.query in endpoints)

Even though it seems he is using older version? I for sure had to make this change on latest release but not on older ones.

@sveltejs/adapter-vercel: next => 1.0.0-next.32 
@sveltejs/kit: next => 1.0.0-next.201 

Nevermind, I just realised that with 'next' set, Vercel would get the latest version. So I guess he will have to stick with a specific version or make changes.

@Rich-Harris
Copy link
Member

Even though it seems he is using older version?

In all likelihood a newer version is being installed on Vercel. This would explain why it works locally

@HeritagePalms
Copy link

Even though it seems he is using older version?

In all likelihood a newer version is being installed on Vercel. This would explain why it works locally

There i go thinking and typing at different timings...

@Rich-Harris Rich-Harris mentioned this issue Dec 30, 2021
5 tasks
@seppegadeyne
Copy link
Author

seppegadeyne commented Dec 30, 2021

url and params are not available in $app/stores like described in "...and the page store has been replaced with url and params stores" #3126

Screenshot from 2021-12-30 22-32-09

page store doesn't contain url see console.log ...

Screenshot from 2021-12-30 22-33-11

In dev mode all works fine like it used to be. Seems like the fresh npm install is not installing that version which is using the new stores....

Screenshot from 2021-12-30 22-38-08

@Rich-Harris
Copy link
Member

Consult the docs, not the PR (things changed between the initial comment and what ended up getting shipped). You're looking for the page store

@Rich-Harris
Copy link
Member

@seppegadeyne
Copy link
Author

Now I can see it in dev mode too when I change "@sveltejs/kit": "next" to "@sveltejs/kit": "1.0.0-next.209". Bummer....

@Rich-Harris
Copy link
Member

You should be getting an error message that tells you how to fix it?

@seppegadeyne
Copy link
Author

Yes now it does when I put 1.0.0-next.209 version active :-) , with next version it's not.

Screenshot from 2021-12-30 22-46-29

@Rich-Harris
Copy link
Member

next.209 is the next version (or at least it was, I just released next.210), you just weren't up to date locally. You should keep "next" in your package.json, otherwise you'll be stuck on 209 forever.

Looks like the issue is resolved — we okay to close this?

@netaisllc
Copy link
Contributor

BTW, using simply next does render the error in the browser as well as the CLI...

Error: request.path has been replaced by request.url.pathname
    at Object.get (file:///Users/kevinm/Projects/Strongcloud/app-zero/node_modules/@sveltejs/kit/dist/ssr.js:1750:11)
    at Object.handle (//Users/kevinm/Projects/Strongcloud/app-zero/src/hooks:7:52)
    at respond (file:///Users/kevinm/Projects/Strongcloud/app-zero/node_modules/@sveltejs/kit/dist/ssr.js:1760:30)
    at svelteKitMiddleware (file:///Users/kevinm/Projects/Strongcloud/app-zero/node_modules/@sveltejs/kit/dist/chunks/index.js:4577:28)

@seppegadeyne
Copy link
Author

@Rich-Harris yes okay to close. Thanks for the support. Best wishes for the New Year! ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pkg:adapter-vercel Pertaining to the Vercel adapter
Projects
None yet
Development

No branches or pull requests

5 participants