Questions tagged [watchify]

Watchify allows you to send all your notifications to your SmartWatch2. persistent browserify bundler that watches files for changes and only rebuilds what it needs to. Watchify doesn't have a gulp plugin, but it doesn't need one either: you can use vinyl-source-stream to pipe the bundle stream into your gulp pipeline.

watchify is a persistent browserify bundler that watches files for changes and only rebuilds what it needs to. Watchify doesn't have a gulp plugin, but it doesn't need one either as it's possible to use vinyl-source-stream to pipe the bundle stream into the gulp pipeline.

watchify npm package: https://www.npmjs.com/package/watchify.

89 questions
0
votes
1 answer

Watchify - Uncaught ReferenceError: require is not defined

i need Node.js feature like require() function in my javascript code so i am using watchify, but it is still giving me error Uncaught ReferenceError: require is not defined at jsfile.js:3 despite the fact that watchify bundles code and inspects into…
iLiA
  • 3,053
  • 4
  • 23
  • 45
0
votes
1 answer

Gulp: paths.scss.forEach is not a function

I have written the following gulp task: var paths = require('./package.json').paths; var watching = false; gulp.task('scss', function () { var processors = [ autoprefixer({ browsers: ['last 2 versions', '> 0.5%', 'ie >= 8',…
Code_Ninja
  • 1,729
  • 1
  • 14
  • 38
0
votes
1 answer

"Write after end": how to imitate gulp-watch with watchify?

The following Gulp task does almost what I want. const gulp = require('gulp'); const browserify = require('browserify'); const vinylStream = require('vinyl-source-stream'); const vinylBuffer = require('vinyl-buffer'); const watchify =…
Julian
  • 4,176
  • 19
  • 40
0
votes
1 answer

Npm ‘Dev’ Watchify/Browserify/vueify cmd to compile Vue component and start Express server fails? (server fails to start)

I’m following a tutorial https://mindthecode.com/using-vue-components-in-your-express-app/ to use vue components with Express. Part of that is configuring an npm dev script to compile the vue component with Browserify/vueify, start Watchify, then…
Rob
  • 11
  • 3
0
votes
1 answer

PhpStorm - watchify connection bug

When I switched my editor to PhpStorm I found a bug working with watchify. By default watchify makes browserify to update a bundle if one of files using in a bundle is changed. Generally it works. But sometimes on a file nothing happens. On the next…
FreeLightman
  • 2,224
  • 2
  • 27
  • 42
0
votes
1 answer

Bundling javascript files to watch with Gulp and Nodeman

I have the start and deploy tasks working the way I want them to but I am trying to figure out how to update public/js/bundle.js when I make a change in app.js so that it can be watched. Here's what I got so far: var gulp = require('gulp'); var…
user1572796
  • 1,057
  • 2
  • 21
  • 46
0
votes
1 answer

How handle watchify errors in gulp. Watchify prevent error from being reported

When I include watchify plugin in a browserify bundler and there is an compile time error, the error is not logged. const gulp = require('gulp'); const browserify = require('browserify'); //js bundler const watchify =…
Liero
  • 25,216
  • 29
  • 151
  • 297
0
votes
0 answers

Why am I unable to import my main.jsx file while starting my react app?

This is the first react app i am trying to make but i am stuck with this error. the file structure seems to be correct and also my starting point.Please help me figure it out why it cannot find main.jsx module . file structure react-skeleton | +--…
Suraj Sharma
  • 180
  • 5
  • 15
0
votes
1 answer

gulp watchify needs two saves to include changes

Been trying to use watchify for a while now and I have a problem with the saving. It seems like for every change I make, I need to save two times in order for the changes to be applied in the output. If I add code in any js-file, the newly added…
Joel
  • 380
  • 3
  • 16
0
votes
1 answer

RactJS hot reloading browserify/watchify/livereactload websocket error

I have following gulp.js configuration. It kind of works. Once I save a file on the server I can see the rebundling proces starting and ending as expected. However the broswer recieves just an error: bundle.js:37 WebSocket connection to…
Stefan
  • 828
  • 12
  • 24
0
votes
2 answers

anyone use watchify on linux? shouldn't it automatically be using inotify?

I'm on Linux trying to use watchify and keep getting Error: Cannot find module 'fsevents' from ~/dir Why is fsevents even being considered by my system? Isn't it strictly a Mac tool? How do I get node to use inotify as its default file monitor…
ddaaggeett
  • 149
  • 2
  • 10
0
votes
0 answers

Docker - Running watchify inside container does not work

I'm new to docker and trying to build my dev-container. I would like to have running watchify(https://www.npmjs.com/package/watchify) for concat files while Im developing. Docker can manage volumes. I could have watchify running on my system but I…
kitimenpolku
  • 2,604
  • 4
  • 36
  • 51
0
votes
1 answer

Watchify not looking at changes in parent folders

I have a bunch of apps under a single folder with a common dependency. /app/app1/src/main.js /app/app2/src/main.js /app/app3/src/main.js /common/tools.js Now several instances of Watchify is running for all of these and if I change anything in any…
Magnus Engdal
  • 5,446
  • 3
  • 31
  • 50
0
votes
1 answer

How to Babelify (with React), Browserify, Uglify, and Watchify in one line

I want to avoid using Gulp or Grunt (anyone else tired of those?) and turn /src /component index.jsx index.jsx into /dist bundle.min.js using a one-line command that I can put in my package.json file: ... "scripts": { …
Seth
  • 6,514
  • 5
  • 49
  • 58
0
votes
1 answer

How to define a gulp task that initiates watchify and gulp-stylus?

I am trying to create a composite gulp task which runs 2 separate watch tasks at the same time: gulp.task('watch-css', watchCssTask); // uses gulp-stylus gulp.task('watch-js', watchJsTask); // uses watchify (browserify) What is the correct way to…
Lea Hayes
  • 62,536
  • 16
  • 62
  • 111