Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

[nodemon] app crashed - waiting for file changes before starting... issue

0 votes
1,190 views
added Sep 13, 2017 in NPM by theoh_lee Corporal (810 points)

To solve this issue; delete your node_modules and rebuild npm ( npm install)

  1. ls to locate your node_modules directory
  2. rm -rf node_modules
  3. npm i/npm install

1 Response

+1 vote
responded Apr 5 by umekalu Recruit (160 points)
I encountered this challenge when working on nexmo sms app.

To fix the crashing, go to your `app.js`. If you have these lines of code. Its normally on the very first lines...

    `import { Socket } from 'dgram';`
    
    `const express = require('express');`
    `const bodyParser = require('body-parser');`
    `const ejs = require('ejs');`
    `const Nexmo = require('nexmo');`
    `const socketio = require('socket.io');`

Simply delete/remove the first line of code
`import { Socket } from 'dgram';`

Leaving these ones...

        `const express = require('express');`
        `const bodyParser = require('body-parser');`
        `const ejs = require('ejs');`
        `const Nexmo = require('nexmo');`
        `const socketio = require('socket.io');`

and restart your application using "nodemon"

Did it work?
lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...