-
Notifications
You must be signed in to change notification settings - Fork 234
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
import shim from ". /shim.mjs"
worked fine on cloudflare pages a couple weeks ago, now I get TypeError: an.fetch is not a function
#576
Comments
Which version of worker-build are you using? It sounds like Pages may not support the new WorkerEntrypoint interface introduced for RPC. Edit: are you supplying a custom JavaScript entrypoint script? |
Thanks. After changing the version of worker-build back to 0.1.0 everything is fine. Hopefully maybe the new WorkerEntrypoint interface could have some compatibility with the current Cloudflare Pages. |
What is the source of the code you included? Is Pages supplying that or are you using a custom entrypoint script? That may need to be updated to the new shim provided by worker-build |
I'm using this code as Cloudflare Pages Fucntions and it works fine with worker-build@0.1.0 + worker-rs@0.1.0 |
Yes, what I'm saying is that the bug may not be with Pages, but with the JavaScript you posted in your first message. Where did that come from? |
Yes, but where did the code in your first message come from? Is that your code? If so, you should update it to be compatible with the new interface. |
Sorry, I wrote the wrong version number in this sentence. I actually switched back to version 0.0.10 You can compile the hello-world template to get index.wasm and shim.mjs then test it as Pages Functions using the code in myfirst message. The problem occurs when you use worker-build@0.1.0 & worker-rs@0.2.0 |
This code used to work fine on cloudflare pages, now it gets
TypeError: An.fetch is not a function
The text was updated successfully, but these errors were encountered: