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

🐛 BUG: site manifest isn't generated correctly when wrangler dev/publish is run in a non-root directory #1235

Closed
threepointone opened this issue Jun 12, 2022 · 1 comment · Fixed by #1236 or #1249
Assignees
Labels
bug Something that isn't working

Comments

@threepointone
Copy link
Contributor

threepointone commented Jun 12, 2022

What version of Wrangler are you using?

2.0.9

What operating system are you using?

Mac

Describe the Bug

  1. cd examples/legacy-site-app && wrangler dev
  2. Open localhost:8787 and the page loads as expected
  3. cd workers-site && npx wrangler dev index.js
  4. Open localhost:8787 and you'll see a message could not find index.html in your content namespace

I think this is because we don't modify site.bucket to be resolved relative to the path to wrangler.toml.

@threepointone threepointone added the bug Something that isn't working label Jun 12, 2022
@threepointone
Copy link
Contributor Author

Hmm we already account for the config path here https://github.com/cloudflare/wrangler2/blob/f8a21ede2034f921b978e4480fe2e6157953a308/packages/wrangler/src/sites.tsx#L283-L285 so it must be something else...

threepointone added a commit that referenced this issue Jun 12, 2022
We had a bug where we were generating asset manifest keys incorrectly if we ran wrangler from a different path to `wrangler.toml`. This fixes the generation of said keys, and adds a test for it.

Fixes #1235
@threepointone threepointone changed the title 🐛 BUG: site.bucket should be resolved relative to wrangler.toml 🐛 BUG: site manifest isn't generated correctly when wrangler dev/publish is run in a non-root directory Jun 12, 2022
@threepointone threepointone self-assigned this Jun 13, 2022
threepointone added a commit that referenced this issue Jun 13, 2022
We had a bug where we were generating asset manifest keys incorrectly if we ran wrangler from a different path to `wrangler.toml`. This fixes the generation of said keys, and adds a test for it.

Fixes #1235
threepointone added a commit that referenced this issue Jun 14, 2022
We had a bug where we were generating asset manifest keys incorrectly if we ran wrangler from a different path to `wrangler.toml`. This fixes the generation of said keys, and adds a test for it.

Fixes #1235
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that isn't working
Projects
None yet
1 participant