-
Notifications
You must be signed in to change notification settings - Fork 205
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
Service binding not work in miniflare 3 #625
Comments
Hey! 👋 Unrelated, but you'll also want to import import { Miniflare, Response } from "miniflare"; |
Hi @mrbbot Thanks, but the version is 3.2. |
Hmmm, very strange. A few other things to try:
|
Hi, @mrbbot Thanks! package.json file: {
"name": "my-invest-gateway",
"version": "0.0.1",
"private": true,
"main": "src/index.ts",
"scripts": {
"deploy": "wrangler deploy src/index.ts",
"dev": "wrangler dev src/index.ts --local",
"test": "jest"
},
"dependencies": {
"@cfworker/uuid": "^1.12.4",
"hono": "^3.1.5"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20230518.0 ",
"@types/jest": "^29.5.2",
"esbuild": "^0.15.1",
"esbuild-jest": "^0.5.0",
"jest": "^29.1.2",
"jest-environment-miniflare": "^2.6.0",
"miniflare": "^3.20230628.0",
"wrangler": "^3.0.0"
}
} jest.config.js
node REPL:
|
Ah, when using Miniflare's API for testing ( |
Thanks @mrbbot But it still can't test 😢
Even I add |
@madawei2699 apologies for not following up here! This got completely buried in my inbox. 😢 If you're still working on this project, you'll need to build your TypeScript source code first, then point Miniflare to the built output. @AbdallahAbis if this is still an issue for you, would you be able to create a new GitHub issue? |
Similar issue with service binding #782 |
Hi,
I can't setup the service binding with miniflare 3, here is my test code:
and here is my code:
when I run
npm run test
, there is an error:The text was updated successfully, but these errors were encountered: