Closed jarah closed 9 years ago
:+1:
I had sort of the same issue, my issue was that i didn't correctly include the needed files in app.js.
Nothing looks out of the ordinary. Can you provide more context?
+1
Here's my situation:
function scripts() {
var bundler = watchify(browserify("./src/app.jsx", assign({
extensions: [".jsx"]
}, watchify.args)));
bundler.transform(reactify);
function bundle() {
return bundler.bundle()
.pipe(source("app.js"))
.on("error", handleError)
.pipe(buffer())
.pipe(uglify())
.pipe(gulp.dest("./public/dist/" + env + "/js"));
}
bundler.on("update", bundle);
bundler.on("log", gutil.log);
return bundle();
}
Same thing: works first load, but never calls the bundle()
function again.
Running 2.6.0. Tried downgrading to a bunch of different watchify versions to no luck. Browserify version: 9.0.3.
@kendagriff Nothing wrong jumps out at me, can you point me a repo I can clone?
I have created a repo with a minimal bit of code to reproduce the issue: https://github.com/sjcrank/watchify-issue144
@sjcrank What you're seeing was a temporary issue in browserify@9.0.6, substack/node-browserify#1195 fixed it. So just reinstall watchify so that it pulls in browserify@9.0.7 and it all works.
Thanks @zertosh I have verified that with an npm update it is working fine.
There must be something wrong w/ my environment: if I even run watchify (3.1.0) from the command line on a single file, in verbose mode, it does not register changes to the file.
Is there an obvious dependency of mine that could be corrupted?
Have installed with
Saw the following in the log
In my package.json I have added the following
Have created a /dist folder, however when I try
It writes the first time, but doesn't subsequently trigger another build when app.jsx is changed. I'm using Webstorm to edit files. I'm on an old Macbook Pro with Snow Leapord.
Any ideas?