You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
POST requests against the Netlify dev server responds with a 404 error with Function not found...
To Reproduce
Steps to reproduce the behavior:
Run npx create-remix@latest --template netlify/remix-template
Select Netlify Functions when prompted by installer
Create a new route ./app/routes/edit.tsx with a <Form method="POST"> and an action function (see example below)
Start server using netlify dev
Open localhost:8888/edit in browser
Post form
// app/routes/edit.tsximport{ActionFunctionArgs}from"@remix-run/node";import{Form}from"@remix-run/react";exportdefaultfunctionEdit(){return(<Formmethod="POST"><label>
Title
<input/></label><buttontype="submit">Save</button></Form>)}exportasyncfunctionaction({ request }: ActionFunctionArgs){return{message: "This is a message from the server",}}
Expected behavior
The page on port 8888 should not crash, it should behave the same as when opening localhost:3000, i.e. the Remix dev server, where the POST request works fine. Also, PUT requests seem to work fine on both ports.
I expect to be able to run the netlify dev server locally, as I need to run certain rewrites and redirects specified in netlify.toml.
Describe the bug
POST requests against the Netlify dev server responds with a 404 error with
Function not found...
To Reproduce
Steps to reproduce the behavior:
npx create-remix@latest --template netlify/remix-template
Netlify Functions
when prompted by installer./app/routes/edit.tsx
with a<Form method="POST">
and anaction
function (see example below)netlify dev
localhost:8888/edit
in browserExpected behavior
The page on port
8888
should not crash, it should behave the same as when openinglocalhost:3000
, i.e. the Remix dev server, where the POST request works fine. Also, PUT requests seem to work fine on both ports.I expect to be able to run the netlify dev server locally, as I need to run certain rewrites and redirects specified in
netlify.toml
.Screenshots
On port 3000, the POST works:
On port 8888, the POST does not work:
Desktop:
The text was updated successfully, but these errors were encountered: