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

Tutorial leads to "NOT_FOUND" deployment #142

Closed
test3211234 opened this issue Jan 27, 2024 · 5 comments
Closed

Tutorial leads to "NOT_FOUND" deployment #142

test3211234 opened this issue Jan 27, 2024 · 5 comments

Comments

@test3211234
Copy link

I'm new to Vercel, and wanted to use it in Rust. However, something in your README.md tutorial must be wrong or missing as this is what happens after following it and deploying it:

image

You also never spoke about these:

image

I notice you never spoke about a package.json too, even though it's in your examples. I copy pasted it, and it made no difference. Also, is this project dead? I don't see many updates.

@Zxilly
Copy link
Contributor

Zxilly commented Feb 16, 2024

I use rewrite to route the traffic, see https://github.com/Zxilly/OnedriveHostsGenerator/blob/master/vercel.json

@dglsparsons
Copy link
Collaborator

Hey, not a dead project at all. It's just not under active development at the moment, and is a community effort.

The Build & Development Settings are not needed for the Rust Runtime.

Could you share a link to your deployment, so I can investigate? I suspect it could be the rewrites, but I'm not sure.

Thanks 🙏

@TraceLD
Copy link

TraceLD commented Mar 18, 2024

@test3211234 This is because by default the router uses directory structure based routing so your function is at localhost:3000/api/handler.

@loopassembly
Copy link

loopassembly commented Jun 19, 2024

I had the same issue, and this configuration helped me. Thanks to @Zxilly !
localhost:3000/api/handler

    "outputDirectory": "public",
    "functions": {
      "api/**/*.rs": {
        "runtime": "[email protected]"
      }
    },
    "rewrites": [
      {
        "source": "/(.*)",
        "destination": "/api/handler"
      }
    ]
  }

@ecklf
Copy link
Collaborator

ecklf commented Aug 26, 2024

Closing as fix is available.

@ecklf ecklf closed this as completed Aug 26, 2024
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

6 participants