-
Notifications
You must be signed in to change notification settings - Fork 26
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
Error in browser when using the plugin method in Gulp+Browserify+Browsersync #33
Comments
Try applying browserify-hmr before watchify: bundler.plugin(hmr);
var watchify = require('watchify');
watcher = watchify(bundler); Let me know if that works for you. Note that there's an open issue about using browserify-hmr with browserSync; I haven't investigated if they are compatible. |
Thanks so much for your quick response. However, doesn't matter which order I put it or whether I use hmr as the plugin to browserify, or watchify. I still get the above error. I think the issue is the |
Does this only break when you add watchify? Do you ever change the build process's current working directory? Is the build process's current working directory (should be the directory that the gulpfile is in) the same directory that your package.json (that lists browserify-hmr as a dependency) is located in? Can you make a small reproducible example? |
The point though is, all the other libraries include fine. So the problem On Friday, October 28, 2016, Chris Cowan notifications@github.com wrote:
|
I'm not home now, so I'll try to create a reproducible project. On Friday, October 28, 2016, Mykone Saunders mykonesaunders@gmail.com
|
Using the plugin technique in my Gulp environment.
Builds ok, but when browser runs, I am getting:
Cannot find module './node_modules/browserify-hmr/inc/index.js'
Not sure what I am doing wrong, but, if I run "watchify -p browserify-hmr" from the command line , as in your example, it works fine. I am trying to integrate it in my current dev environment which is using Gulp+Browserify+BrowserSync.
The text was updated successfully, but these errors were encountered: