Every time I try and run gulp watch
on my brand-new project, I get the following error output:
[11:19:32] Using gulpfile /path/to/project/dev/site/public/wp-content/themes/project_name/gulpfile.js
[11:19:32] Starting 'watch'...
[11:19:32] Finished 'watch' after 78 ms
[BS] Proxying: http://dev.project_name
[BS] Access URLs:
----------------------------------
Local: http://localhost:3000
External: http://10.0.0.8:3000
----------------------------------
UI: http://localhost:3001
UI External: http://10.0.0.8:3001
----------------------------------
child_process.js:1155
throw errnoException(err, 'spawn');
^
Error: spawn EACCES
at exports._errnoException (util.js:746:11)
at ChildProcess.spawn (child_process.js:1155:11)
at Object.exports.spawn (child_process.js:988:9)
at module.exports (/path/to/project/dev/site/public/wp-content/themes/project_name/node_modules/browser-sync/node_modules/opn/index.js:58:24)
at Object.utils.open (/path/to/project/dev/site/public/wp-content/themes/project_name/node_modules/browser-sync/lib/utils.js:185:23)
at Object.utils.openBrowser (/path/to/project/dev/site/public/wp-content/themes/project_name/node_modules/browser-sync/lib/utils.js:175:23)
at EventEmitter.events.service:running (/path/to/project/dev/site/public/wp-content/themes/project_name/node_modules/browser-sync/lib/internal-events.js:40:23)
at EventEmitter.emit (events.js:129:20)
at /path/to/project/dev/site/public/wp-content/themes/project_name/node_modules/browser-sync/lib/browser-sync.js:246:19
at /path/to/project/dev/site/public/wp-content/themes/project_name/node_modules/browser-sync/node_modules/async-each-series/index.js:15:40
(names changed to protect the innocent)
The vanilla gulp
command executes fine, and Iβve removed /node_modules + /bower_components and re-run npm install
and bower install
twice, but I get the same problem every time.
Iβve tried this solution Gulp Watch error on Ubuntu 14.04 [solved] but it has no apparent effect.
If I remove the following section from my gulpfile, gulp watch
works correctly (i.e. it watches my files and regenerates them if changes are made), but obviously does not reload the browser:
browserSync({
files: [path.dist, '{lib,templates}/**/*.php', '*.php'],
proxy: config.devUrl,
snippetOptions: {
whitelist: ['/wp-admin/admin-ajax.php'],
blacklist: ['/wp-admin/**']
}
});
This leads me to believe the problem is solidly with BrowserSync, but Iβm not familiar enough with how BrowserSync works to guess where it might be failing.
Iβm running Ubuntu 14.04.2 LTS. My project is using a Vagrant box for a local server, but Iβm running npm/gulp/etc on my command line, not in the Vagrant box.
node: v0.12.0
npm: 2.9.0
bower: 1.4.1
gulp: 3.8.11
Let me know if thereβs any more information I can provide to help debug this issue. Thanks.