Ben
Ben
CDCloudflare Developers
Created by Ben on 7/29/2024 in #workers-help
wrangler dev --local refuses connection after invoking tRPC requests on macos
Hello. We have a very bizarre issue with macos. When we run wrangler in dev mode initially everything works, but after hit some endpoints with tRPC, wrangler breaks. Then I cannot fetch anything from wrangler, and the console isn't saying anything. It just refuses the connect. This only happens on our macos machine, the linux machine works fine. Additionally --remote mode works fine.
1 replies
CDCloudflare Developers
Created by Ben on 3/24/2024 in #workers-help
No matching export in for import "WebSocketPair" even though I see the type.
I have a weird error where when I run wrangler it doesn't see the export of the WebSocketPair type even though I see the exported type in the file the log is referencing.. Also, other types work like "DurableObjectState" Here is where is it messing up:
import { DurableObjectState, WebSocketPair } from "@cloudflare/workers-types";
import { DurableObjectState, WebSocketPair } from "@cloudflare/workers-types";
Here is my package.json:
{
"name": "@croak/hono-crud",
"version": "0.0.0",
"license": "MIT",
"type": "module",
"main": "src/index.ts",
"types": "src/index.ts",
"scripts": {
"deploy": "wrangler deploy --minify",
"dev": "wrangler dev --port 8080 --remote",
"lint": "eslint .",
"format": "prettier --check . --ignore-path ../../.gitignore",
"typecheck": "tsc --noEmit",
"clean": "rm -rf .turbo .wrangler node_modules",
"localtunnel": "npx lt --port 8080"
},
"dependencies": {
"@acme/shared-functions": "*",
"@clerk/backend": "^0.30.*",
"@cloudflare/ai": "^1.0.53",
"@hono/clerk-auth": "^1.0.0",
"@hono/trpc-server": "*",
"@paralleldrive/cuid2": "^2.2.2",
"@trpc/server": "next",
"cors": "^2.8.5",
"drizzle-zod": "^0.5.1",
"hono": "^3.11.7",
"superjson": "1.9.1",
"svix": "^1.16.0",
"typescript": "^5.3.3",
"zod": "^3.22.4"
},
"devDependencies": {
"@acme/db": "*",
"@cloudflare/workers-types": "^4.20231121.0",
"eslint": "^8.56.0",
"localtunnel": "^2.0.2",
"prettier": "^3.1.1",
"tsup": "^8.0.1",
"typescript": "^5.3.3",
"wrangler": "^3.22.1"
}
}
{
"name": "@croak/hono-crud",
"version": "0.0.0",
"license": "MIT",
"type": "module",
"main": "src/index.ts",
"types": "src/index.ts",
"scripts": {
"deploy": "wrangler deploy --minify",
"dev": "wrangler dev --port 8080 --remote",
"lint": "eslint .",
"format": "prettier --check . --ignore-path ../../.gitignore",
"typecheck": "tsc --noEmit",
"clean": "rm -rf .turbo .wrangler node_modules",
"localtunnel": "npx lt --port 8080"
},
"dependencies": {
"@acme/shared-functions": "*",
"@clerk/backend": "^0.30.*",
"@cloudflare/ai": "^1.0.53",
"@hono/clerk-auth": "^1.0.0",
"@hono/trpc-server": "*",
"@paralleldrive/cuid2": "^2.2.2",
"@trpc/server": "next",
"cors": "^2.8.5",
"drizzle-zod": "^0.5.1",
"hono": "^3.11.7",
"superjson": "1.9.1",
"svix": "^1.16.0",
"typescript": "^5.3.3",
"zod": "^3.22.4"
},
"devDependencies": {
"@acme/db": "*",
"@cloudflare/workers-types": "^4.20231121.0",
"eslint": "^8.56.0",
"localtunnel": "^2.0.2",
"prettier": "^3.1.1",
"tsup": "^8.0.1",
"typescript": "^5.3.3",
"wrangler": "^3.22.1"
}
}
2 replies