assemble-workshop
assemble-workshop copied to clipboard
TypeError: app.watch is not a function
Using assemble v0.17.1
...
app.task('build', [ 'init' ], function () {
return app.pages.src('./src/pages/*.hbs')
.pipe(app.renderFile())
.pipe( extname())
.pipe(app.dest('./dist'))
.pipe(browserSync.stream())
})
app.watch('./src/layouts/default.hbs', ['build'])
Console output:
app.watch('./src/layouts/default.hbs', ['build'])
^
TypeError: app.watch is not a function
at Object.<anonymous> (/Users/kees/workspaces/boplicity/api-watch-static/assemblefile.js:45:5)
at Module._compile (module.js:573:32)
at Object.Module._extensions..js (module.js:582:10)
at Module.load (module.js:490:32)
at tryModuleLoad (module.js:449:12)
at Function.Module._load (module.js:441:3)
at Module.require (module.js:500:17)
at require (internal/module.js:20:19)
at run (/usr/local/lib/node_modules/assemble/bin/cli.js:45:11)
at Object.<anonymous> (/usr/local/lib/node_modules/assemble/bin/cli.js:132:1)
@kdekooter Thanks for the issue! If you're reporting a bug, please be sure to include:
- The version of
assemble
you are using. - Your assemblefile.js (This can be in a gist)
- The commandline output. (Screenshot or gist is fine)
- What you expected to happen instead.
I was able to make things work by adding this:
var watch = require('base-watch')
app.use(watch())
Thanks for posting this. Which recipe did you see this in?
Sorry, I forgot to mention that. It is the browser-sync recipe.
Thanks for reporting this. I have updated the recipe and submitted a PR to merge it into the repo.