downgrade your Wrangler version to 3.61.0 or less and use wrangler dev (or wrangler commands)
downgrade your Wrangler version to 3.61.0 or less
and use wrangler dev (or wrangler commands)
and use wrangler dev (or wrangler commands)
wrangler dev if that's what you're trying to do?wrangler dev is Miniflare under the hood, and runs Workerswrangler version in your package.json?npx likes to be annoying with caching. What happens if you run npx wrangler@3.63.1 devnpm create cloudflare@latest: https://developers.cloudflare.com/workers/get-started/guide/
npm create cloudflare@latest. That'll ensure you get all the right dependencies and thingsminiflare directly for some specific purpose, or just run a script on Cloudflare Workers?wrangler dev is not how you'd invoke something like that - the miniflare API runs via node, but is not generally something 99% of users will need to touchnpm create cloudflare@latest, it'll give you a basic foundation script and a dev script you can run via npm run dev, etc.Miniflare like that via wrangler dev. The miniflare APIs are intended for much lower programattic access and is what wrangler uses under the hoodonode and not wrangler. But if this is for some test suite, the vitest integration is going to be your best option: https://developers.cloudflare.com/workers/testing/vitest-integration/node directly
"dev": "NODE_ENV=development wrangler dev -e dev src/index.ts",wrangler 3.62 when using localhost with different ports for services? I've tried many workarounds to set origins / responseheaders but localdev wrangler is still blocking CORS as of latest update (doesn't happen on wrangler: 3.00. Is it advised to use no-cors on localmode?npm run dev / npm start te following error is thrown, can anyone help me why is this happening.npm run deploy deployed the application successfully, still local dev is not working.Why?getPlatformProxy not support RPCs?getPlatformProxy to access the cloudflare env in local development.getPlatformProxy should definitely support RPC: https://github.com/cloudflare/workers-sdk/blob/e7c06d78b14eb89060f431bc4aee8dbc1cc08fa5/fixtures/get-platform-proxy/tests/get-platform-proxy.env.test.ts#L182 node_modules\wrangler\wrangler-dist\cli.js:29765
throw a;
^
Error: write EOF
at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:94:16)
at WriteWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -4095,
code: 'EOF',
syscall: 'write'
}
Node.js v18.18.2DevalueError: Cannot stringify POJOs with symbolic keys
at flatten (~/project/node_modules/.pnpm/miniflare@3.20240701.0/node_modules/.pnpm/devalue@4.3.2/node_modules/devalue/src/stringify.js:145:13)
... 3 lines matching cause stack trace ...
at async ProxyServer.fetch (~/project/node_modules/.pnpm/miniflare@3.20240701.0/node_modules/miniflare/src/workers/core/proxy.worker.ts:157:11) {
cause: Error [DevalueError]: Cannot stringify POJOs with symbolic keys
at flatten (~/project/node_modules/.pnpm/miniflare@3.20240701.0/node_modules/.pnpm/devalue@4.3.2/node_modules/devalue/src/stringify.js:145:13)
at stringify (~/project/node_modules/.pnpm/miniflare@3.20240701.0/node_modules/.pnpm/devalue@4.3.2/node_modules/devalue/src/stringify.js:178:16)
at stringifyWithStreams (~/project/node_modules/.pnpm/miniflare@3.20240701.0/node_modules/miniflare/src/workers/core/devalue.ts:242:27)
at #fetch (~/project/node_modules/.pnpm/miniflare@3.20240701.0/node_modules/miniflare/src/workers/core/proxy.worker.ts:342:30)
at async ProxyServer.fetch (~/project/node_modules/.pnpm/miniflare@3.20240701.0/node_modules/miniflare/src/workers/core/proxy.worker.ts:157:11)const { getPlatformProxy } = await import("wrangler")
const platform = await getPlatformProxy()
console.log(await platform.env.MY_SERVICE.testRPCFunction())npx wrangler@3.63.1 devnpm create cloudflare@latestnpm create cloudflare@latestnpm create cloudflare@latestMiniflare"dev": "NODE_ENV=development wrangler dev -e dev src/index.ts",