-
Notifications
You must be signed in to change notification settings - Fork 797
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: Cannot wrangler pages deploy with pnpm from subdirectory #6224
Comments
hi @IanVS thank you for reporting this issue with us. I am not able to reproduce this behaviour. I used https://github.com/cloudflare/workers-sdk/tree/main/fixtures/pages-functions-with-routes-app as my test Pages app. In this project, I:
The I noticed you are running the dev command with |
Hi @CarmenPopoviciu thanks for taking a look. I use pnpm in my project, so I did intend to use that, rather than |
Hi @IanVS, I tried running |
Thanks for taking a look @edmundhung. Here's a minimal reproduction: https://github.com/IanVS/cloudflare-workers-issue-6224. Steps are in the README. |
hi @IanVS, thank you so much for the reproduction repository ❤️. It was extremely helpful in understanding what the issue at hand is. I can indeed confirm that if I run The reason you're seeing that error is because Pages attempts to resolve the directory of static assets, in this case The fix here would be pretty straightforward, in that you could have the Pages expects the In your example, the Currently we do not support customising the path of the
I hope this helps, but let me know if you have any more questions <3 |
Thanks for taking a look, @CarmenPopoviciu, but I have to question one thing. You said that wrangler uses Considering this is supported in |
oh! you are right indeed. I was very convinced I tried running that manually and had it working, but it's very possible I was running npx instead of pnpm. The cwd seems to have been a red herring in this case. Reopening. Thx for catching that! |
Which Cloudflare product(s) does this pertain to?
Pages, Wrangler core
What version(s) of the tool(s) are you using?
3.63.1 [wrangler]
What version of Node are you using?
20.11.1
What operating system and version are you using?
macos sonoma 14.5
Describe the Bug
Observed behavior
I build my pages project into a subdirectory which includes my functions, so I need to run
pnpm wrangler pages deploy
from that directory. But when I do, wrangler seems to look in the wrong spot for the wrangler tmp.My project root is
/Users/ianvs/code/defined/webclient
, and i run the following command from/Users/ianvs/code/defined/webclient/.definednet
:Note that it is not looking in
code/defined/webclient
, but rathercode/defined
, one directory too high. The listed file does exist in the correctcode/defined/webclient/.wrangler/tmp
directory.Expected behavior
Should execute successfully
Steps to reproduce
pnpm wrangler pages deploy
against your built project.Please provide a link to a minimal reproduction
No response
Please provide any relevant error logs
No response
The text was updated successfully, but these errors were encountered: