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
I've been having very strange issues with razzle and hot reloading. Is there a cache it uses that I can clear? Sometimes the hot reloading will be working, and adding console.log shows up, but other parts of the code will not have updated so what's on disk and what I see in the browser is subtly different. Restarting razzle or the computer solves that problem. But I also see other wierd things that even seem to survive reboots. Case in point:
✅ Server-side HMR Enabled!
[HMR] Cannot apply update.
[HMR] Syntax Error: Unexpected )
GraphQL request (6:47)
5: name
6: buildings(status: "ACTIVE", sort: ) {
^
7: data {
[HMR] You need to restart the application!
Running in development mode
🚀 started
> grep buildings src/queries/AvailabilityQueries.js
buildings(status: "${BUILDING_STATUS.ACTIVE}") {
That dangling sort: comes from code I was working on yesterday, on a different branch. I've rebooted since then, I'm on a clean branch, and as you can see there's no dangling sort: on disk. So how is that error happening? I feel like this is a very clear example of the problems I've been having.
I managed to fix it by doing rm -rf node_modules && npm install. I'm a bit puzzled by why that worked, is there some kind of cache in the node_modules directory maybe?
Not necessarily the same issue, but I was having similar symptoms: Restarting razzle wouldn't pick up new code that I had, and babel loader was complaining at the old code syntax (which wasn't there anymore).
I've been having very strange issues with razzle and hot reloading. Is there a cache it uses that I can clear? Sometimes the hot reloading will be working, and adding console.log shows up, but other parts of the code will not have updated so what's on disk and what I see in the browser is subtly different. Restarting razzle or the computer solves that problem. But I also see other wierd things that even seem to survive reboots. Case in point:
That dangling sort: comes from code I was working on yesterday, on a different branch. I've rebooted since then, I'm on a clean branch, and as you can see there's no dangling sort: on disk. So how is that error happening? I feel like this is a very clear example of the problems I've been having.
I managed to fix it by doing
rm -rf node_modules && npm install
. I'm a bit puzzled by why that worked, is there some kind of cache in the node_modules directory maybe?Do you have any ideas about what might be going wrong? Thanks!
The text was updated successfully, but these errors were encountered: