The problem
After updating to truffle 3.3.0, Truffle serve fails on Ubuntu 16.04 and Mac OS El Capitan 10.11. The following error is returned when running 'truffle serve':
/Users/cameronvoell/.npm-packages/lib/node_modules/truffle/build/cli.bundled.js:123830
return (new fsevents(path)).on('fsevent', callback).start();
^
TypeError: fsevents is not a constructor
at createFSEventsInstance (/Users/cameronvoell/.npm-packages/lib/node_modules/truffle/build/cli.bundled.js:123830:11)
at setFSEventsListener (/Users/cameronvoell/.npm-packages/lib/node_modules/truffle/build/cli.bundled.js:123884:16)
at FSWatcher.FsEventsHandler._watchWithFsEvents (/Users/cameronvoell/.npm-packages/lib/node_modules/truffle/build/cli.bundled.js:124048:16)
at FSWatcher.<anonymous> (/Users/cameronvoell/.npm-packages/lib/node_modules/truffle/build/cli.bundled.js:124182:25)
at LOOP (fs.js:1758:14)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
Camerons-MacBook-Air:test cameronvoell$ node version
module.js:471
throw err;
Current Solution
Workaround would be to run npm run dev
instead of truffle serve
. Works for me on macOS 10.12.6.