Donejs develop server crashing in place-my-order app

I am working through the place-my-order guide.
When I start the donejs develop server, I get the following error: (although it does run) (took out all http protocols in order to publish this post)

place-my-order@0.0.0 develop /home/dovid/mm_workspace/DoneJS Examples/place-my-order
can-serve --develop --proxy localhost:7070 --port 8080

can-serve starting on localhost:8080
Received client connection
Live-reload server listening on port 8012
throw er; // Unhandled ‘error’ event

Error: watch /home/dovid/mm_workspace/DoneJS Examples/place-my-order/node_modules/steal/ext/npm.js ENOSPC
at exports._errnoException (util.js:856:11)
at FSWatcher.start (fs.js:1314:19)
at (fs.js:1342:11)
at createFsWatchInstance (/home/dovid/mm_workspace/DoneJS Examples/place-my-order/node_modules/chokidar/lib/nodefs-handler.js:37:15)
at setFsWatchListener (/home/dovid/mm_workspace/DoneJS Examples/place-my-order/node_modules/chokidar/lib/nodefs-handler.js:80:15)
at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/dovid/mm_workspace/DoneJS Examples/place-my-order/node_modules/chokidar/lib/nodefs-handler.js:228:14)
at FSWatcher.NodeFsHandler._handleFile (/home/dovid/mm_workspace/DoneJS Examples/place-my-order/node_modules/chokidar/lib/nodefs-handler.js:255:21)
at FSWatcher. (/home/dovid/mm_workspace/DoneJS Examples/place-my-order/node_modules/chokidar/lib/nodefs-handler.js:473:21)
at FSReqWrap.oncomplete (fs.js:83:15)

Then after I added the supermodel and refreshed, it crashes the server and I get the following:
/home/dovid/mm_workspace/DoneJS Examples/place-my-order/node_modules/http-proxy/lib/http-proxy/index.js:119
throw err;

Error: connect ECONNREFUSED
at Object.exports._errnoException (util.js:856:11)
at exports._exceptionWithHostPort (util.js:879:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1064:14)

npm ERR! Linux 3.13.0-74-generic
npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “run” "develop"
npm ERR! node v5.2.0
npm ERR! npm v3.5.2
npm ERR! place-my-order@0.0.0 develop: can-serve --develop --proxy localhost:7070 --port 8080
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the place-my-order@0.0.0 develop script ‘can-serve --develop --proxy localhost:7070 --port 8080’.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the place-my-order package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! can-serve --develop --proxy localhost:7070 --port 8080
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs place-my-order
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR! npm owner ls place-my-order
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/dovid/mm_workspace/DoneJS Examples/place-my-order/npm-debug.log
Error: Command npm did not complete successfully
at ChildProcess. (/home/dovid/mm_workspace/DoneJS Examples/place-my-order/node_modules/donejs-cli/lib/utils.js:37:23)
at emitTwo (events.js:88:13)
at ChildProcess.emit (events.js:173:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:201:12)

I can also send the npm-debug.log if that will help.


This looks like a NodeJS watch error, potentially a permission issue. What operating system are you using (it looks like Linux)? The second error is probably because the old server is still running even though it crashed.

I am using ubuntu 14.04.

should I run the server under sudo?

just tried running under sudo, and I did NOT get the first error. I did still get the second error when I reloaded the page and it crashed.

You might have a Node process that didn’t exit cleanly when you got the original error. Do:

ps aux | grep node

And kill the processes that shouldn’t be live.

I killed the processes and tried again.

Without sudo, got the watch error. With sudo, no watch error but I did get the 2nd error.

Do you have the API running? It’s a separate npm script.

ah, no. it wasn’t. But when I tried it said, “not found.” And when I tried to reinstall it, I got a whole long list of errors. So basically the install didn’t work. Here is the beginning of the errors I got:

loadDep:madison → 304 ▌ ╢█████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
npm WARN deprecated lodash@0.9.2: lodash@<2.0.0 is no longer maintained. Upgrade to lodash@^3.0.0
npm WARN deprecated lodash@1.0.1: lodash@<2.0.0 is no longer maintained. Upgrade to lodash@^3.0.0

bufferutil@1.1.0 install /home/dovid/mm_workspace/DoneJS Examples/place-my-order/node_modules/bufferutil
node-gyp rebuild

make: Entering directory `/home/dovid/mm_workspace/DoneJS Examples/place-my-order/node_modules/bufferutil/build’
CXX(target) Release/
In file included from …/src/
…/node_modules/nan/nan.h:261:25: error: redefinition of ‘template v8::Local _NanEnsureLocal(v8::Local)’
NAN_INLINE v8::Local _NanEnsureLocal(v8::Local val) {
…/node_modules/nan/nan.h:256:25: error: ‘template v8::Local _NanEnsureLocal(v8::Handle)’ previously declared here
NAN_INLINE v8::Local _NanEnsureLocal(v8::Handle val) {
…/node_modules/nan/nan.h:661:13: error: ‘node::smalloc’ has not been declared
, node::smalloc::FreeCallback callback
…/node_modules/nan/nan.h:661:35: error: expected ‘,’ or ‘…’ before ‘callback’
, node::smalloc::FreeCallback callback

Ok, couple of things. If you are using the guide you are likely using donejs 0.5 which does not support Node 4/5. See for the version requirements. donejs 0.6.0 will come out this week with support for Node 4/5, you can try out the pre-release by running npm install donejs@0.6.0-pre.1.

After your bufferutil errors, these errors don’t mean that the install failed. They are for an optionalDependency that is not actually required. We are working to get rid of the modules which cause these errors as I know it is confusing to see errors, naturally you would think that it failed.

So either try with 0.6.0-pre.1 or install Node 0.12 and let us know.

ok, thanks. I’ll try that.

well I tried installing 0.6.0-pre.1 and I got a bunch of seeming errors, but I could run donejs api. However it started spewing out node processes until it nearly crashed my computer.

So, I tried removing donejs, nodejs, api and starting over with nodejs 0.12 like in your SettingUp guide.

When I tried to install the api, again I got a bunch of errors. And again when I started up donejs api, it just kept creating new node processes until I killed it.

Here are the npm errors when trying to install api
make: *** [Release/] Error 1
make: Leaving directory /home/dovid/mm_workspace/DoneJS Examples/place-my-order/node_modules/utf-8-validate/build' gyp ERR! build error gyp ERR! stack Error:makefailed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23) gyp ERR! stack at emitTwo (events.js:88:13) gyp ERR! stack at ChildProcess.emit (events.js:173:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:201:12) gyp ERR! System Linux 3.13.0-74-generic gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/dovid/mm_workspace/DoneJS Examples/place-my-order/node_modules/utf-8-validate gyp ERR! node -v v5.2.0 gyp ERR! node-gyp -v v3.2.1 gyp ERR! not ok npm WARN install:utf-8-validate@1.1.0 utf-8-validate@1.1.0 install:node-gyp rebuild`
npm WARN install:utf-8-validate@1.1.0 Exit status 1
place-my-order@0.0.0 /home/dovid/mm_workspace/DoneJS Examples/place-my-order
├─┬ documentjs@0.3.3
│ ├── async@0.2.10
│ └── lodash@2.4.2
├── donejs@0.6.0-pre.1 extraneous
├─┬ donejs-deploy@0.3.1
│ ├─┬ divshot-cli@1.11.0
│ │ ├─┬ copy-files@0.1.0
│ │ │ └── lodash@2.4.2
│ │ ├── lodash@2.4.2
│ │ ├─┬ nash@0.3.3
│ │ │ └── lodash@2.4.2
│ │ ├─┬ sizer@0.1.1
│ │ │ └─┬ shrub@0.2.0
│ │ │ └── async@0.2.10
│ │ └─┬ superstatic@1.2.1
│ │ ├── lodash@2.4.2
│ │ ├─┬ redirects@1.1.1
│ │ │ └─┬ toxic@1.0.0
│ │ │ └── lodash@2.4.2
│ │ └─┬ van@0.0.4
│ │ └── lodash@2.4.2
│ └─┬ firebase-tools@2.2.0
│ └─┬ universal-analytics@0.3.10
│ └── async@0.2.10
├─┬ place-my-order-api@0.4.3
│ ├─┬ feathers@1.1.1
│ │ └─┬ feathers-errors@0.2.5
│ │ └── lodash@2.4.2
│ ├─┬ feathers-hooks@0.5.1
│ │ └── lodash@2.4.2
│ ├─┬ feathers-nedb@0.1.0
│ │ └─┬ nedb@1.5.1
│ │ ├── async@0.2.10
│ │ ├─┬ binary-search-tree@0.2.5
│ │ │ └── underscore@1.4.4
│ │ ├─┬ localforage@1.3.1
│ │ │ └── promise@5.0.0
│ │ └── underscore@1.4.4
│ └── madison@0.0.7
├─┬ steal-tools@0.13.0
│ ├─┬ uglify-js@2.4.24
│ │ └── async@0.2.10
│ └─┬ winston@0.7.3
│ └── async@0.2.10
└─┬ testee@0.2.3
├─┬ feathers-memory@0.3.4
│ └── lodash@2.4.2
├─┬ istanbul@0.4.1
│ └─┬ handlebars@4.0.5
│ └─┬ uglify-js@2.6.1
│ └── async@0.2.10
└── lodash@2.4.2

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.6
npm WARN place-my-order@0.0.0 No description
npm WARN place-my-order@0.0.0 No repository field.
npm WARN place-my-order@0.0.0 No license field.

it seems to still be trying to use node 5, and when I node -v it says 5.2.0 (nodejs -v is 0.12) but when I try sudo apt-get remove node, it says it isn’t installed. So I am now somewhat confused.

ok, I finally got 5.2 removed and am trying to install api with 0.12, and so far it’s in the process so hoping for the best.

after removing everything and starting over it seems to be working.

thanks for your help.

I’m working on Node 5 and the PMO app for the rest of this week.