D
D
Dmitry Snegirev2014-07-16 17:34:32
Node.js
Dmitry Snegirev, 2014-07-16 17:34:32

How do I fix the express app after downloading git?

Actually I start and I can not understand what is the error:

$ DEBUG=okna node ./bin/www
  okna Express server listening on port 3000 +0ms
GET / 304 51ms

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: spawn ENOENT
    at errnoException (child_process.js:1000:11)
    at Process.ChildProcess._handle.onexit (child_process.js:791:34)

Tell me how to deal with such situations
Node.js version
0.10.29 I don't have the event.js file.
This is what package.json looks like:
{
  "name": "okna",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node ./bin/www"
  },
  "dependencies": {
    "body-parser": "~1.0.0",
    "cookie-parser": "~1.0.1",
    "debug": "~0.7.4",
    "ejs": "~0.8.5",
    "express": "~4.2.0",
    "express-generator": "^4.2.0",
    "morgan": "~1.0.0",
    "node-compass": "0.2.3",
    "nodemailer": "^0.7.1",
    "static-favicon": "~1.0.0"
  }
}

So, I found out that the error is due to compass.
it was worth commenting out this line and everything worked:
app.use(require('node-compass')({mode: 'expanded'}));
Does anyone know why it works on another computer?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Pavlov, 2014-07-16
@Rikkit

Do you have an events.js file? in it in line 72 there is a line throw er; which throws an exception, which causes the application to crash. In theory, the program should not reach this line, or there should be a global exception handler.
After downloading from git, did you do npm install? Have you loaded all the required modules?
UPD. We found out that the problem is not in your code, but in a third-party module, more precisely, in your environment for this module to work.
Do you have ruby ​​installed on this computer? the node-compass module requires the ruby ​​gem to be installed ( link how to install )

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question