-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Deploy command is not including wrangler.toml file contents #57
Comments
Hey @amiranvarov, thanks for this issue and your kind words. Yep it seems like the path to wrangler is not set correctly I will take a look at this today. |
I'll be documenting my findings over here. It seems the wrangler is being found. If you remove it, you will see an error instead of a warning. I will dig further into why the |
My guess right now is that they have an issue with their exported binary, which is what the plugin uses. The alternative is to invoke Wrangler using npx or similar. |
sir, you are one kind of a legend for such a fast feedback! Thanks a lot! Let's see, if they will fix the issue in their next binary releases. "The alternative is to invoke Wrangler using npx or similar." I'm not familiar with NX much, but i have a feeling that it may cause bunch of other issues with module imports. I assume that your plugin does held wrangler to understand the path aliases mentioned in tsconfig, and other stuff that NX uses under the hood to put all pieces (libraries to be precise) together. If i will try to invoke Wrangler by itself, he will tell me that he has no idea what the hell is being imported from where... But maybe i'm wrong, and it will be way easier. |
Just for context, the plugin works by calling the underlying tool command (wrangler, in this case) inside the context of an Nx executor. There are a couple of ways of doing that. You can resolve the binary exposed by the library—that's what we do here. You can also call the library using a package manager like pnpm dlx, npx, etc. We will do that for the next builder. But both are giving me the same result. It is hard to see what's going wrong. When I call Wrangler directly from the app folder, the warning is not there, but it will be shown when using the plugin. Wrangler had a similar issue in the past with this warning. I'll continue trying stuff. What I can tell is that the wrangler.toml is being read. Beyond the warning you should not have any issues when deploying. I'm using the project and I can assure it is loading the bindings correctly. |
You're welcome; I will keep this open while I continue investigating. |
Current Behavior
Hey, first of all, great work! It made my getting started experience with cloudflare so much easier!!! Thank you!
second of all, I'm just starting out, i hope i didn't label it as a bug unecessary. If I did so, sorry.
So, let's proceed to the issue. I just installed this awesome plugin, and when i hit the deploy, i get the warning message: "▲ [WARNING] Using the latest version of the Workers runtime. To silence this warning, please choose a specific version of the runtime with --compatibility-date, or add a compatibility_date to your wrangler.toml."
I checked the file system, there is indeed wrangler.toml file generated and it has a content of:
but for some reason, during the deploy Cloudflare is not receiving those params. Here are some screenshots:
Expected Behavior
we should not see warning message and compatibility_date param should be injected into deployment by reading the local wrangler.toml file
GitHub Repo
No response
Steps to Reproduce
Nx Report
Failure Logs
No response
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: