You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use vite and cloudflare template to create a remix project
npx create-remix@latest --template remix-run/remix/templates/cloudflare
Run the Vite dev server:
npm run dev
then failed with information below:
> dev
> remix vite:dev
Proxy environment variables detected. We'll use your proxy for fetch requests.
TypeError: fetch failed
at fetch (/.../node_modules/wrangler/wrangler-dist/cli.js:17033:19)
at async getRegisteredWorkers (/..../node_modules/wrangler/wrangler-dist/cli.js:127783:22)
at async getBoundRegisteredWorkers (/.../node_modules/wrangler/wrangler-dist/cli.js:127803:29)
at async getMiniflareOptionsFromConfig (/.../node_modules/wrangler/wrangler-dist/cli.js:173568:29)
at async getPlatformProxy (/.../node_modules/wrangler/wrangler-dist/cli.js:173540:28)
at async configureServer (/.../node_modules/@remix-run/dev/dist/vite/cloudflare-proxy-plugin.js:55:11)
at async _createServer (file:///.../node_modules/vite/dist/node/chunks/dep-whKeNLxG.js:64978:24)
at async configResolved (/../node_modules/@remix-run/dev/dist/vite/plugin.js:746:27)
at async Promise.all (index 2)
at async resolveConfig (file:///.../node_modules/vite/dist/node/chunks/dep-whKeNLxG.js:68410:5) {
cause: SocketError: other side closed
at Socket.onSocketEnd (/.../node_modules/wrangler/wrangler-dist/cli.js:7263:27)
at Socket.emit (node:events:526:35)
at Socket.emit (node:domain:488:12)
at endReadableNT (node:internal/streams/readable:1589:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
code: 'UND_ERR_SOCKET',
socket: {
localAddress: '192.168.2.215',
localPort: 54946,
remoteAddress: '192.168.2.1',
remotePort: 7890,
remoteFamily: 'IPv4',
timeout: undefined,
bytesWritten: 256,
bytesRead: 39
}
}
}
if I run Wrangler with:
npm run build
then failed with information below:
> build
> remix vite:build
Proxy environment variables detected. We'll use your proxy for fetch requests.
TypeError: fetch failed
at fetch (/.../node_modules/wrangler/wrangler-dist/cli.js:17033:19)
at async getRegisteredWorkers (/.../node_modules/wrangler/wrangler-dist/cli.js:127783:22)
at async getBoundRegisteredWorkers (/.../node_modules/wrangler/wrangler-dist/cli.js:127803:29)
at async getMiniflareOptionsFromConfig (/.../node_modules/wrangler/wrangler-dist/cli.js:173568:29)
at async getPlatformProxy (/.../node_modules/wrangler/wrangler-dist/cli.js:173540:28)
at async configureServer (/.../node_modules/@remix-run/dev/dist/vite/cloudflare-proxy-plugin.js:55:11)
at async _createServer (file:///.../node_modules/vite/dist/node/chunks/dep-whKeNLxG.js:64978:24)
at async configResolved (/.../node_modules/@remix-run/dev/dist/vite/plugin.js:746:27)
at async Promise.all (index 2)
at async Module.resolveConfig (file:///.../node_modules/vite/dist/node/chunks/dep-whKeNLxG.js:68410:5) {
cause: SocketError: other side closed
at Socket.onSocketEnd (/.../node_modules/wrangler/wrangler-dist/cli.js:7263:27)
at Socket.emit (node:events:526:35)
at Socket.emit (node:domain:488:12)
at endReadableNT (node:internal/streams/readable:1589:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
code: 'UND_ERR_SOCKET',
socket: {
localAddress: '192.168.2.215',
localPort: 55852,
remoteAddress: '192.168.2.1',
remotePort: 7890,
remoteFamily: 'IPv4',
timeout: undefined,
bytesWritten: 256,
bytesRead: 39
}
}
}
If I remove the http_proxy env setting. then everything is OK.
I find the doc on Cloudflare and it seems wrangler support http_proxy env.
npm run dev command start the dev server successfully.
npm run build command build successfully.
Actual Behavior
Run the Vite dev server:
npm run dev
then failed with information below:
> dev
> remix vite:dev
Proxy environment variables detected. We'll use your proxy for fetch requests.
TypeError: fetch failed
at fetch (/.../node_modules/wrangler/wrangler-dist/cli.js:17033:19)
at async getRegisteredWorkers (/..../node_modules/wrangler/wrangler-dist/cli.js:127783:22)
at async getBoundRegisteredWorkers (/.../node_modules/wrangler/wrangler-dist/cli.js:127803:29)
at async getMiniflareOptionsFromConfig (/.../node_modules/wrangler/wrangler-dist/cli.js:173568:29)
at async getPlatformProxy (/.../node_modules/wrangler/wrangler-dist/cli.js:173540:28)
at async configureServer (/.../node_modules/@remix-run/dev/dist/vite/cloudflare-proxy-plugin.js:55:11)
at async _createServer (file:///.../node_modules/vite/dist/node/chunks/dep-whKeNLxG.js:64978:24)
at async configResolved (/../node_modules/@remix-run/dev/dist/vite/plugin.js:746:27)
at async Promise.all (index 2)
at async resolveConfig (file:///.../node_modules/vite/dist/node/chunks/dep-whKeNLxG.js:68410:5) {
cause: SocketError: other side closed
at Socket.onSocketEnd (/.../node_modules/wrangler/wrangler-dist/cli.js:7263:27)
at Socket.emit (node:events:526:35)
at Socket.emit (node:domain:488:12)
at endReadableNT (node:internal/streams/readable:1589:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
code: 'UND_ERR_SOCKET',
socket: {
localAddress: '192.168.2.215',
localPort: 54946,
remoteAddress: '192.168.2.1',
remotePort: 7890,
remoteFamily: 'IPv4',
timeout: undefined,
bytesWritten: 256,
bytesRead: 39
}
}
}
The text was updated successfully, but these errors were encountered:
Reproduction
1.the http_proxy in my env variables and it's work fine with other tools like curl and wget
http_proxy=http://192.168.2.1:7890
Use vite and cloudflare template to create a remix project
npx create-remix@latest --template remix-run/remix/templates/cloudflare
Run the Vite dev server:
then failed with information below:
then failed with information below:
If I remove the http_proxy env setting. then everything is OK.
I find the doc on Cloudflare and it seems wrangler support http_proxy env.
System Info
Used Package Manager
npm
Expected Behavior
npm run dev command start the dev server successfully.
npm run build command build successfully.
Actual Behavior
Run the Vite dev server:
then failed with information below:
The text was updated successfully, but these errors were encountered: