wojtkowiak / meteor-desktop

Build a Meteor's desktop client with hot code push.
MIT License
448 stars 81 forks source link

HMR of Vue doesn't work #291

Closed diavrank closed 3 years ago

diavrank commented 3 years ago

Hello, I'm using Vue JS in the front-end (through akryum package) and in the console appears each second the same error:

GET http://meteor/socket.io/?EIO=3&transport=polling&t=NRWgWGL net::ERR_NAME_NOT_RESOLVED

Another issue is that HMR/HCP is not working, because I make some modification in the code and it is not reflected (neither if I reload the page with cmd + R). I have to restart meteor-desktop process in order to see the changes.

Screen Shot 2021-01-09 at 18 49 24

However, it works in the browser:

Screen Shot 2021-01-09 at 18 52 41

So, I wonder if it is possible to change http://meteor to another IP Address? Maybe that is the problem.

diavrank commented 3 years ago

I have resolved it. I had to configure NO_HMR=1 as environment variable and run meteor app as follow:

NO_HMR=1 meteor --mobile-server <ip_address>:3000 --settings settings-development.json

And the error has gone :) image

Despite disable HMR of Vue, the app is reloaded automatically when a there is a code change because I didn't know that meteor-desktop has already HCP configured. Perfect!