JorgenVatle / meteor-vite

⚡ Replace Meteor's bundler with Vite for blazing fast build-times
MIT License
16 stars 5 forks source link

Crash when file modification on the server side #146

Closed harry-73 closed 1 month ago

harry-73 commented 1 month ago

Hi,

I am using:

Meteor 3 beta6 vite-bundler 2.0.0 beta.12 meteor-vite 1.10.2

When I run meteor run and after I modify a file on server side, I have the following error.

=> Started proxy.                             
=> Started HMR server.                        
I20240320-15:23:34.952(1)? ⚡   Starting Vite server...
W20240320-15:23:34.960(1)? (STDERR) ⚡  You are using an out of date version of `meteor-vite`.
W20240320-15:23:34.960(1)? (STDERR)    Please update it: $ meteor npm i meteor-vite@1.8.0
=> Started your app.

=> App running at: http://localhost:3000/
I20240320-15:23:35.580(1)?   ➜  Local:   http://localhost:5173/
I20240320-15:23:35.580(1)?   ➜  Network: http://192.168.214.1:5173/
I20240320-15:23:35.594(1)? ⚡   Meteor-Vite ready for connections!
I20240320-15:23:35.598(1)? ⚡   Meteor-Vite ready for connections!
I20240320-15:24:13.337(1)? ⚡   Starting Vite server...
W20240320-15:24:13.338(1)? (STDERR) ⚡  You are using an out of date version of `meteor-vite`.
W20240320-15:24:13.338(1)? (STDERR)    Please update it: $ meteor npm i meteor-vite@1.8.0
I20240320-15:24:13.372(1)? aaa
=> Meteor server restarted at: http://localhost:3000/
W20240320-15:24:13.724(1)? (STDERR) FetchError: request to http://true:5173/__meteor__/ipc-message failed, reason: getaddrinfo ENOTFOUND true
W20240320-15:24:13.725(1)? (STDERR)     at ClientRequest.<anonymous> (/home/xxx/.meteor/packages/fetch/.0.1.4-beta300.6.1i5dqqd.u8xn++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/node-fetch/lib/index.js:1505:11)
W20240320-15:24:13.725(1)? (STDERR)     at ClientRequest.emit (node:events:518:28)
W20240320-15:24:13.725(1)? (STDERR)     at ClientRequest.emit (node:domain:488:12)
W20240320-15:24:13.725(1)? (STDERR)     at Socket.socketErrorListener (node:_http_client:495:9)
W20240320-15:24:13.726(1)? (STDERR)     at Socket.emit (node:events:518:28)
W20240320-15:24:13.726(1)? (STDERR)     at Socket.emit (node:domain:488:12)
W20240320-15:24:13.726(1)? (STDERR)     at emitErrorNT (node:internal/streams/destroy:169:8)
W20240320-15:24:13.726(1)? (STDERR)     at emitErrorCloseNT (node:internal/streams/destroy:128:3)
W20240320-15:24:13.727(1)? (STDERR)     at processTicksAndRejections (node:internal/process/task_queues:82:21) {
W20240320-15:24:13.727(1)? (STDERR)   type: 'system',
W20240320-15:24:13.727(1)? (STDERR)   errno: 'ENOTFOUND',
W20240320-15:24:13.727(1)? (STDERR)   code: 'ENOTFOUND'
W20240320-15:24:13.727(1)? (STDERR) }
W20240320-15:24:13.734(1)? (STDERR) FetchError: request to http://true:5173/__meteor__/ipc-message failed, reason: getaddrinfo ENOTFOUND true
W20240320-15:24:13.734(1)? (STDERR)     at ClientRequest.<anonymous> (/home/xxx/.meteor/packages/fetch/.0.1.4-beta300.6.1i5dqqd.u8xn++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/node-fetch/lib/index.js:1505:11)
W20240320-15:24:13.734(1)? (STDERR)     at ClientRequest.emit (node:events:518:28)
W20240320-15:24:13.734(1)? (STDERR)     at ClientRequest.emit (node:domain:488:12)
W20240320-15:24:13.734(1)? (STDERR)     at Socket.socketErrorListener (node:_http_client:495:9)
W20240320-15:24:13.735(1)? (STDERR)     at Socket.emit (node:events:518:28)
W20240320-15:24:13.735(1)? (STDERR)     at Socket.emit (node:domain:488:12)
W20240320-15:24:13.735(1)? (STDERR)     at emitErrorNT (node:internal/streams/destroy:169:8)
W20240320-15:24:13.735(1)? (STDERR)     at emitErrorCloseNT (node:internal/streams/destroy:128:3)
W20240320-15:24:13.735(1)? (STDERR)     at processTicksAndRejections (node:internal/process/task_queues:82:21) {
W20240320-15:24:13.735(1)? (STDERR)   type: 'system',
W20240320-15:24:13.735(1)? (STDERR)   errno: 'ENOTFOUND',
W20240320-15:24:13.735(1)? (STDERR)   code: 'ENOTFOUND'
W20240320-15:24:13.736(1)? (STDERR) }
W20240320-15:24:13.753(1)? (STDERR) FetchError: request to http://true:5173/__meteor__/ipc-message failed, reason: getaddrinfo ENOTFOUND true
W20240320-15:24:13.753(1)? (STDERR)     at ClientRequest.<anonymous> (/home/xxx/.meteor/packages/fetch/.0.1.4-beta300.6.1i5dqqd.u8xn++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/node-fetch/lib/index.js:1505:11)
W20240320-15:24:13.753(1)? (STDERR)     at ClientRequest.emit (node:events:518:28)
W20240320-15:24:13.753(1)? (STDERR)     at ClientRequest.emit (node:domain:488:12)
W20240320-15:24:13.755(1)? (STDERR)     at Socket.socketErrorListener (node:_http_client:495:9)
W20240320-15:24:13.755(1)? (STDERR)     at Socket.emit (node:events:518:28)
W20240320-15:24:13.755(1)? (STDERR)     at Socket.emit (node:domain:488:12)
W20240320-15:24:13.756(1)? (STDERR)     at emitErrorNT (node:internal/streams/destroy:169:8)
W20240320-15:24:13.759(1)? (STDERR)     at emitErrorCloseNT (node:internal/streams/destroy:128:3)
W20240320-15:24:13.759(1)? (STDERR)     at processTicksAndRejections (node:internal/process/task_queues:82:21) {
W20240320-15:24:13.759(1)? (STDERR)   type: 'system',
W20240320-15:24:13.759(1)? (STDERR)   errno: 'ENOTFOUND',
W20240320-15:24:13.759(1)? (STDERR)   code: 'ENOTFOUND'
W20240320-15:24:13.760(1)? (STDERR) }
I20240320-15:24:13.763(1)? ⚡  Vite server running as background process. (pid 22692)
I20240320-15:24:13.767(1)? ⚡   Meteor-Vite ready for connections!

The repo to reproduce: https://github.com/harry-73/meteor3-cordova-vite

JorgenVatle commented 1 month ago

Hey there 👋

Shipped a fix for this issue with jorgenvatle:vite-bundler@2.0.0-beta.13. Let me know how it goes. 🤞

harry-73 commented 1 month ago

There is progress.

Now it is the duplication of http://http//

20240321-22:54:24.403(1)? (STDERR) FetchError: request to http://http//192.168.1.98:5173/__meteor__/ipc-message failed, reason: getaddrinfo ENOTFOUND http
W20240321-22:54:24.403(1)? (STDERR)     at ClientRequest.<anonymous> (/home/xxx/.meteor/packages/fetch/.0.1.4-beta300.6.1i5dqqd.u8xn++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/node-fetch/lib/index.js:1505:11)
W20240321-22:54:24.403(1)? (STDERR)     at ClientRequest.emit (node:events:518:28)
W20240321-22:54:24.403(1)? (STDERR)     at ClientRequest.emit (node:domain:488:12)
W20240321-22:54:24.404(1)? (STDERR)     at Socket.socketErrorListener (node:_http_client:495:9)
W20240321-22:54:24.404(1)? (STDERR)     at Socket.emit (node:events:518:28)
W20240321-22:54:24.404(1)? (STDERR)     at Socket.emit (node:domain:488:12)
W20240321-22:54:24.404(1)? (STDERR)     at emitErrorNT (node:internal/streams/destroy:169:8)
W20240321-22:54:24.404(1)? (STDERR)     at emitErrorCloseNT (node:internal/streams/destroy:128:3)
W20240321-22:54:24.404(1)? (STDERR)     at processTicksAndRejections (node:internal/process/task_queues:82:21) {
W20240321-22:54:24.405(1)? (STDERR)   type: 'system',
W20240321-22:54:24.405(1)? (STDERR)   errno: 'ENOTFOUND',
W20240321-22:54:24.405(1)? (STDERR)   code: 'ENOTFOUND'
W20240321-22:54:24.405(1)? (STDERR) }
JorgenVatle commented 1 month ago

Oops 😅

jorgenvatle:vite-bundler@2.0.0-beta.14 should fix this for you. 👍

harry-73 commented 1 month ago

Well done.

It is solved.