watchify icon indicating copy to clipboard operation
watchify copied to clipboard

no longer reloading

Open mattdesl opened this issue 9 years ago • 25 comments

Using grunt-browserify with watch mode, [email protected] does not reload on file change. If I cd into node_modules/grunt-browserify and npm install [email protected] it reloads properly.

The code is private, but if I get a chance I will try to boil it down to a smaller test repo.

mattdesl avatar Aug 27 '15 19:08 mattdesl

+1

jennasalau avatar Aug 28 '15 02:08 jennasalau

I can reproduce this issue at https://github.com/uwdata/vega-lite

With 3.3, gulp serve gets stuck. With 3.2 everything is fine.

domoritz avatar Aug 30 '15 23:08 domoritz

+1

jljorgenson18 avatar Aug 31 '15 23:08 jljorgenson18

@mattdesl It's probably this https://github.com/substack/watchify/pull/250#issuecomment-126404248 https://github.com/substack/watchify/issues/256#issuecomment-130261185

zertosh avatar Sep 02 '15 03:09 zertosh

@domoritz I vega-lite at 49ee1ca with watchify 3.3.1 and it works. Maybe you had an old version browserify? Try removing the node_modules directory and reinstalling your packages.

zertosh avatar Sep 02 '15 03:09 zertosh

I updated Browserify from 11.0.0 to 11.0.1 and it started working again.

jljorgenson18 avatar Sep 02 '15 03:09 jljorgenson18

Jup, works now in vega-lite with watchify 3.4.

domoritz avatar Sep 02 '15 05:09 domoritz

Still broken in 3.4.0

mattymil avatar Sep 04 '15 13:09 mattymil

@mattymil Can you open a new issue? Please include a way to reproduce the problem

zertosh avatar Sep 04 '15 17:09 zertosh

Will do.

On Sep 4, 2015, at 1:08 PM, Andres Suarez [email protected] wrote:

@mattymil https://github.com/mattymil Can you open a new issue? Please include a way to reproduce the problem

— Reply to this email directly or view it on GitHub https://github.com/substack/watchify/issues/260#issuecomment-137794939.

mattymil avatar Sep 04 '15 17:09 mattymil

:+1:

mightyiam avatar Sep 20 '15 13:09 mightyiam

I'm having the same problem with watch mode not working with watchify 3.4.0. Changes to watched files never trigger a recompile. This actually looks to have been introduced with watchify 3.3.1.

I'm using grunt-browserify 3.8.0, which uses browserify 10.2.6 and watchify 3.4.0.

My grunt-browserify tasks are straightforward, for example:

browserify: {
  options: {
    browserifyOptions: {
      debug: true
    },
    watch: true
  },

  reports: {
    src: [
      '<%= config.src %>/reports/js/main.js',
      '<%= config.src %>/reports/templates/*.hbs'
    ],
      dest: '<%= config.dist %>/reports/js/reports.js'
  }
}

If I manually downgrade watchify to 3.3.0 watch mode works just fine again, but 3.3.1 and above do not work. Regardless, that's not a great solution since the semver dependency of watchify in grunt-browserify is ^3.2.1 which will always download 3.4.0 from npm.

I know we are a few versions behind on browserify, but our dependencies are pinned at the project level for the time being.

ptmccarthy avatar Sep 22 '15 20:09 ptmccarthy

@ptmccarthy You need browserify 11.0.1+

zertosh avatar Sep 23 '15 15:09 zertosh

I've been having these issues for a long time now. Tried today with watchify 3.4.0, and let it pick it's own browserify 11.2.0. Still broken. Works a few times, then just stops working suddenly :disappointed:

Also tried 3.2.2 which works twice and then stops reloading. Weird.

Box Ubuntu 14.10 / Linux 3.17.4 (ext4) Node 0.12.2 & 4.1.1 (tried both) Npm 2.14.4

asbjornenge avatar Oct 02 '15 11:10 asbjornenge

Apparently, if I enable polling it works! --poll=100 and it's back :grin:

asbjornenge avatar Oct 02 '15 12:10 asbjornenge

@asbjornenge Then your issue is not with watchify but with chokidar.

zertosh avatar Oct 02 '15 15:10 zertosh

@mattdesl is this all cleared up?

zertosh avatar Oct 25 '15 22:10 zertosh

@vz8 That sounds like a chokidar issue

zertosh avatar Nov 08 '15 19:11 zertosh

Looks like the relevant issue has not been fixed in chokidar (https://github.com/paulmillr/chokidar/issues/395).

quentindemetz avatar Dec 27 '15 15:12 quentindemetz

:+1: I tried to use watchify and it was effectively just browserify.

1j01 avatar Jan 13 '16 03:01 1j01

@1j01 Are you still affected by this?

For what it's worth, I haven't seen this problem recently.

mattdesl avatar Jan 13 '16 15:01 mattdesl

@mattdesl Let me see... Yes.

1j01 avatar Jan 13 '16 21:01 1j01

Looks like I'm experiencing this issue also.

The chokidar issue looks to have been closed.

Anything we can do to provide further clarification on the root cause?

PaulAik avatar Apr 13 '16 21:04 PaulAik