Ember serve not working

Hello to everyone,

I’m a noob in Ember and JS and I just started with Routes and Templates - Tutorial - Ember Guides. After installing nodejs, bower and watchman I try to run ember s and the following error is thrown.

valentin@valipc ~/super-rentals $ ember s
version: 2.2.0-beta.6
Livereload server on http://localhost:49152
Serving on http://localhost:4200/
error is not defined
ReferenceError: error is not defined
    at ChildProcess.<anonymous> (/home/valentin/super-rentals/node_modules/ember-cli/node_modules/sane/node_modules/fb-watchman/index.js:206:15)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1016:16)
    at Socket.<anonymous> (child_process.js:1184:11)
    at Socket.emit (events.js:107:17)
    at Pipe.close (net.js:484:11)
fs.js:0
(function (exports, require, module, __filename, __dirname) { // Copyright Joy

Error: ENOENT, no such file or directory 'undefined/'
    at Error (native)
    at Object.fs.readdirSync (fs.js:761:18)
    at _walkSync (/home/valentin/super-rentals/node_modules/ember-cli/node_modules/walk-sync/index.js:66:20)
    at Function.entries (/home/valentin/super-rentals/node_modules/ember-cli/node_modules/walk-sync/index.js:47:10)
    at Class.module.exports.Task.extend.getDirectoryEntries (/home/valentin/super-rentals/node_modules/ember-cli/lib/tasks/server/livereload-server.js:112:21)
    at Class.module.exports.Task.extend.didChange (/home/valentin/super-rentals/node_modules/ember-cli/lib/tasks/server/livereload-server.js:135:45)
    at EventEmitter.emit (events.js:129:20)
    at EventEmitter.Watcher.onError (/home/valentin/super-rentals/node_modules/ember-cli/node_modules/broccoli-sane-watcher/index.js:117:8)
    at WatchmanWatcher.emit (events.js:107:17)
    at Client.<anonymous> (/home/valentin/super-rentals/node_modules/ember-cli/node_modules/sane/src/watchman_watcher.js:58:10)

This is the current configuration…

valentin@valipc ~/super-rentals $ ember -v
version: 2.2.0-beta.6
node: 0.12.9
npm: 2.14.10
os: linux x64

Any ideas why is this error present?

Hi There,

I’m also experiencing a similar error. I have installed watchman 4.3.0. ember 2.3.0 ember-cli 1.13.15


`ReferenceError: error is not defined
    at ChildProcess.<anonymous> (/myapp/node_modules/ember-cli/node_modules/sane/node_modules/fb-watchman/index.js:207:15)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:821:16)
    at Socket.<anonymous> (internal/child_process.js:319:11)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at Pipe._onclose (net.js:469:12)
A non-recoverable condition has triggered.  Watchman needs your help!
The triggering condition was at timestamp=1453522116: inotify-add-watch(/myapp/node_modules/ember-cli-qunit/node_modules/broccoli-merge-trees/node_modules/rimraf) -> The user limit on the total number of inotify watches was reached; increase the fs.inotify.max_user_watches sysctl
All requests will continue to fail with this message until you resolve
the underlying problem.  You will find more information on fixing this at
https://facebook.github.io/watchman/docs/troubleshooting.html#poison-inotify-add-watch`

any help would be appreciated

This seems like a Watchman problem, have you tried uninstalling it and running ember serve?

1 Like

@locks you are right, it seems to be caused by watchman. After removing watchman the server starts without any issues.

valentin@valipc ~/super-rentals $ ember s version: 2.2.0-beta.6 Could not find watchman, falling back to NodeWatcher for file system events.

Build successful - 6973ms.

Slowest Trees | Total
----------------------------------------------±-------------------- Babel | 2881ms
Babel | 1767ms
Babel | 665ms
Babel | 417ms

Slowest Trees (cumulative) | Total (avg)
----------------------------------------------±-------------------- Babel (11) | 6181ms (561 ms)

I have also observed an occasional interference with sublime that seems to cause the NOENT error. If you are using sublime: quit sublime, then do “ember serve”, start sublime again.