Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autoreload not work #6

Open
udanpe opened this issue Jun 7, 2016 · 6 comments
Open

Autoreload not work #6

udanpe opened this issue Jun 7, 2016 · 6 comments
Assignees
Labels

Comments

@udanpe
Copy link

udanpe commented Jun 7, 2016

Not work for me
node 4.4.4, express 4

When I change text I have message in console, but web page does not change. Nodemon work fine
index(req, res) { res.send('Text') }
trails > info: App reloaded with changes in api/controllers/TestController.js

@ycpatel813
Copy link

Not working for me also
node v4.4.4 express 5.0.0-alpha.2

@armandopadilla
Copy link

Not working for me as well.
node v4.4.6, hapi v1.0.3.

@armandopadilla
Copy link

armandopadilla commented Jul 17, 2016

@ycpatel813 @udanpe there's a quick fix for this that worked for me. Not sure if itll work for you but its worth a shot.

  1. Open up the npm-modules/trailpack-autoreload/index.js file.
  2. Add the "usePolling" property and set it to true, here https://github.com/trailsjs/trailpack-autoreload/blob/master/index.js#L33

This left me wondering if these config changes should be loading and defined by the user within the app. humm. I feel it should be so I created a PR. #7

@lewebsimple
Copy link

lewebsimple commented Jan 14, 2017

I think I have the same issue (node 6.9.2 / express 4 / handlebars).

App seems to reload just fine "App reloaded with changes in api/controllers/DefaultController.js" when files are changed in api or config, but reloading the web page doesn't reflect the changes made.

  • Tried changing the title passed to my view but text stays the same on the page.
  • Also tried adding a controller action with a route, but I get a 404 when reaching that route.

In both of the above cases, restarting the app manually produced the expected changes.

I suspect Express (or Hapi) has some kind of cache that should be cleared on autoreload., but I didn't find anything in the API for this purpose. Looking at sails-hook-autoreload, they call sails.router.flush(); but this is a custom Sails router function.

@udanpe: Maybe the subject should be more specific, like "Detected file changes aren't reflected after browser reload"

@ngscheurich
Copy link

It appears that I'm having this issue as well. I'll add my info here just in case it's helpful:

  • node v6.9.5
  • trails@2.0.0
  • hapi@15.2.0
  • trailpack-autoreload@1.0.2

Quick demo of the issue:

asciicast

@clayrisser
Copy link

clayrisser commented Feb 23, 2017

The exact same thing is happening to me. It autoreloads, but doesn't actually accept my changes.

{
  "app": "0.0.0",
  "node": "v7.4.0",
  "libs": {
    "http_parser": "2.7.0",
    "node": "7.4.0",
    "v8": "5.4.500.45",
    "uv": "1.10.1",
    "zlib": "1.2.8",
    "ares": "1.10.1-DEV",
    "modules": "51",
    "openssl": "1.0.2j",
    "icu": "58.2",
    "unicode": "9.0",
    "cldr": "30.0.3",
    "tz": "2016j"
  },
  "trailpacks": [
    {
      "name": "repl",
      "version": "2.1.0"
    },
    {
      "name": "router",
      "version": "2.1.0"
    },
    {
      "name": "hapi",
      "version": "2.2.0"
    },
    {
      "name": "autoreload",
      "version": "1.0.2"
    }
  ]
}

@tjwebb tjwebb self-assigned this May 24, 2017
@tjwebb tjwebb added the bug label May 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants