I just built “hugo”, but it seems that on Solaris (and Solaris like system I use SmartOS) it won’t work due to lack of capabilities in fsnotify.
Is there any way to run “hugo” without file system notification features?
Why does “hugo” even need fsnotify at all? I mean it does serve static sites right?
# mkdir hugo
# cd hugo
# go get -v github.com/gohugoio/hugo
# hugo version
Hugo Static Site Generator v0.27-DEV solaris/amd64 BuildDate: 2017-08-30T00:03:11Z
My error message, and note I did not pass a -w flag.
#hugo server
2017/08/30 00:09:57 FEN based watcher not yet supported for fsnotify
Solaris, SmartOS, Openindiana, OmniOS, and Tribblix all will the same FEN watcher fsnotify issue.
Peter Krnjevic recently informed me of Windows USN Journals – it could
be worth exploring. Then there is FEN for Solaris – we haven’t even started
implementing that.
Hopefully I can run “hugo” without loading a Linux Kernel in a KVM (that’s possible) as I prefer if possible to stay with native SmartOS zones.
Thanks for looking at this, however note when I run “hugo -h” merely says the following, there is no “(default true) as such it’s seems like it is implicitly false”.
-w, --watch watch filesystem for changes and recreate as needed
If your correct about the sense of the boolean then the “hugo -h” help message should be fixed. But It looks like ‘-w’ or ‘–watch’ is initialized to false in ./src/github.com/gohugoio/hugo/commands/hugo.go
HugoCmd.Flags().BoolVarP(&buildWatch, “watch”, “w”, false, “watch filesystem for changes and recreate as needed”)
Regardless I get the same error with or without the -w flag when I try to start the web server.
hugo -w server
2017/08/30 12:59:53 FEN based watcher not yet supported for fsnotify
hugo server
2017/08/30 12:59:58 FEN based watcher not yet supported for fsnotify
The error message comes from ./go/src/github.com/fsnotify/fsnotify/fen.go
// NewWatcher establishes a new watcher with the underlying OS and begins waiting for events.
func NewWatcher() (*Watcher, error) {
return nil, errors.New(“FEN based watcher not yet supported for fsnotify\n”)
}
And in ./src/github.com/spf13/viper/viper.go (which I believe is invoked from the “hugo server” command) the above is called from WatchConfig(), this will always exit if called.