Skip to content

Rewrites Not Working as Expected #121

Open
@rajput-hemant

Description

@rajput-hemant

It appears that rewrites are not functioning as expected. Here's my vercel.json configuration:

{
  "rewrites": [
    {
      "source": "/(.*)",
      "destination": "/api"
    }
  ],
  "functions": {
    "api/**/*.rs": {
      "runtime": "vercel-rust@4.0.6"
    }
  }
}

Additionally, when I navigate to an API route, I receive the following error when running vc dev:

❯ vc dev
Vercel CLI 32.2.0
> Ready! Available at http://localhost:3000
> Building vercel-rust@4.0.6:api/simple.rs
> Built vercel-rust@4.0.6:api/simple.rs [2s]
Error: spawn /home/rajput-hemant/.cache/com.vercel.fun/runtimes/provided/bootstrap EACCES
    at Process.ChildProcess._handle.onexit (node:internal/child_process:286:19)
    at onErrorNT (node:internal/child_process:484:16)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)
Error: An unexpected error occurred!
Error: spawn /home/rajput-hemant/.cache/com.vercel.fun/runtimes/provided/bootstrap EACCES
    at Process.ChildProcess._handle.onexit (node:internal/child_process:286:19)
    at onErrorNT (node:internal/child_process:484:16)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions