-
Notifications
You must be signed in to change notification settings - Fork 735
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
wrangler pages dev
404s some functions/routes
#92
Comments
Feels like a bug, we'll investigate this. |
I tried the latest To make sure my project is set up properly, I tried it on WSL and it seems to work fine, but esbuild watch does not work there :( |
Should have put my comment here. It's a bug in the code generator: |
Last night, I kept getting burned by this bug, so this afternoon, I decided I would take some time to finally fix it. Spent a good 30 minutes setting up the environment, reading the contrib doc, and running my first build, etc.
The build, the one that came out this morning 🤣 Can someone, like @elemental-mind, EDIT: I take it back, it bootstraps the middleware properly, but that's it. I'll PR. EDIT AGAIN: See #327 |
I think this has likely been closed by #331 . Can you confirm @Mexican-Man ? |
Thanks @GregBrimble. I thought that commit would fix it, but it doesn't seem to work. I pulled I will try to rebase and redo a PR when I have time. |
It seems as though that PR (or another one from 0.0.16) introduced a bug where the "route deduplication" is disregarding methods. This doesn't seem like it would be a Windows exclusive issue, but I've gone ahead and made another PR #465. |
functions/index.ts
andfunctions/*/index.ts
,functions/_middleware.ts
andfunctions/*/_middleware.ts
work, but nothing else. For example,functions/*/*/index.ts
does not work. Parameterized paths also don't work.I'm on Windows. To repro, open new folder,
npm init
,npm i wrangler@alpha
, createfunctions
folder, createindex.ts
, insert:Run
npx wrangler pages dev ./
. Move it tofunctions/index.ts
, http://localhost:8788/ works fine. Move it tofunctions/test/test/index.ts
, http://localhost:8788/test/test/ returns a 404.The other day, this was happening both when building on Cf and when I tried using
wrangler pages dev
. Now it's just happening with wrangler. This seems like an isolated case, so let me know if there's any more info I can provide.The text was updated successfully, but these errors were encountered: