Browser sync throws a TypeError on init
See original GitHub issueBrowserSync throws a TypeError
when it attempts to reload:
[12:02:53] TypeError: undefined is not a function
at Object.init (/Users/conti/dev/foodjournal-web/node_modules/browser-sync/lib/public/init.js:25:25)
at Gulp.<anonymous> (/Users/conti/dev/foodjournal-web/gulpfile.js:39:15)
at module.exports (/Users/conti/dev/foodjournal-web/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:34:7)
at Gulp.Orchestrator._runTask (/Users/conti/dev/foodjournal-web/node_modules/gulp/node_modules/orchestrator/index.js:273:3)
at Gulp.Orchestrator._runStep (/Users/conti/dev/foodjournal-web/node_modules/gulp/node_modules/orchestrator/index.js:214:10)
at Gulp.Orchestrator.start (/Users/conti/dev/foodjournal-web/node_modules/gulp/node_modules/orchestrator/index.js:134:8)
at Gulp.<anonymous> (/Users/conti/dev/foodjournal-web/node_modules/gulp/index.js:36:18)
at Gaze.<anonymous> (/Users/conti/dev/foodjournal-web/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/index.js:18:14)
at Gaze.emit (events.js:110:17)
at Gaze.emit (/Users/conti/dev/foodjournal-web/node_modules/gulp/node_modules/vinyl-fs/node_modules/glob-watcher/node_modules/gaze/lib/gaze.js:129:32)
That points to the browser-sync
gulp task:
gulp.task('browser-sync', function () {
browserSync.init({
server: {
baseDir: "./public"
}
})
})
Any idea what could be going wrong? I’m using version 2.8.2
.
Issue Analytics
- State:
- Created 8 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
BrowserSync throws a TypeError on init - Stack Overflow
BrowserSync throws a TypeError when it initalizes: [12:02:53] TypeError: undefined is not a function at Object.init ...
Read more >[Solved]-BrowserSync throws a TypeError on init-node.js
Coding example for the question BrowserSync throws a TypeError on init-node.js.
Read more >BrowserSync/browser-sync - Gitter
BrowserSync crashing with a segmentation fault error most of the time we run a gulp-typescript based task which translates our src/**/*.ts into .tmp/**/*.js...
Read more >BrowserSync keeps reloading infinitely upon JavaScript ...
This happens immediately after changing a JavaScript file and using webpack/browersync ( yarn start command). When running yarn build and testing the website...
Read more >Getting Started with Gulp.js - Semaphore Tutorial
create(); function browserSync(cb) { sync.init({ server: { baseDir: "./public ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Make sure you call
create()
first.I’m also affected by this bug, only when I inclide this Javascript, I have no idea where could be the problem: http://imulus.github.io/retinajs/