Questions tagged [nodemon]

nodemon is an automated process that monitors the directory for a given node application. When files change in this directory, nodemon automatically restarts the node application.

nodemon is an automated process that monitors the directory for a given node application. When files change in this directory, nodemon automatically restarts the node application.

Basic usage

nodemon [your node app]
nodemon ./server.js localhost 8080
1355 questions
31
votes
15 answers

Nodemon - "clean exit - waiting for changes before restart" during setup

I am trying to set up a RESTful API with Node and Postgres. I have run into a problem where whenever I attempt to run the server (using npm start) to test it locally, I get the following output: [nodemon] 1.14.10 [nodemon] to restart at any time,…
cosmicluna
  • 539
  • 1
  • 5
  • 16
29
votes
8 answers

Running node-inspector alongside nodemon?

I'm currently using node along with nodemon. Then I got to thinking it might be sometimes nice to use an inspector with node so have started using node-inspector However, is it possible to run both at the same time? Normally to run nodemon I would…
Jamie Hutber
  • 26,790
  • 46
  • 179
  • 291
26
votes
4 answers

Node.js - nodemon vs node - development vs production

I would like to use $>npm start and have it use "nodemon" for development and "node" for production. I can't put conditional logic in my package.json file, so how is this best accomplished?
Alexander Mills
  • 90,741
  • 139
  • 482
  • 817
25
votes
6 answers

Run Nodemon with Typescript compiling?

I want my typescript files to be compiled on every file saving with the command tsc. How do I combine the tsc command with the command that nodemon runs in the build:live script "scripts": { "start": "npm run build:live", "build:live":…
SwiftiSwift
  • 7,528
  • 9
  • 56
  • 96
23
votes
5 answers

Restart Heroku local on file change?

It seems the local server started with "heroku local web" does not watch for file changes and restart itself. How can I make it do this?
Joren
  • 9,623
  • 19
  • 63
  • 104
23
votes
5 answers

Docker /bin/bash: nodemon: command not found

I am trying to mount my working node code from my host into a docker container and run it using nodemon using docker-compose. But container doesn't seems to be able to find nodemon. Note: My host machine does not has node or npm installed on…
Surender Thakran
  • 3,958
  • 11
  • 47
  • 81
22
votes
3 answers

How can I pass arguments to the executable in nodemon (or node-supervisor)?

node can be run with a debug parameter like this $ node --debug src/file.js I can also pass that parameter through the coffee-script binary like this $ coffee --nodejs --debug src/file.coffee Which works. But things get more difficult when I…
Hubro
  • 56,214
  • 69
  • 228
  • 381
22
votes
3 answers

Nodemon not reloading. What's wrong with this nodemon.json file

This is my nodemon.json { "watch": ["src/**/*.ts"], "exec": "node out/index.js" } I run the nodemon by executing: nodemon In root nodejs directory This is output: % nodemon …
VsMaX
  • 1,685
  • 2
  • 16
  • 28
19
votes
7 answers

Error: Cannot find module 'babel-register'

I am currently working on a projects that involves making an oracle connecting to an express back-end. The environment was already implemented and pushed to a repository on github. I cloned the project and ran npm install to get all the packages…
Matt H.
  • 447
  • 1
  • 3
  • 7
19
votes
2 answers

Looks like when I do fs.writeFile(), the changed file restarts nodemon. How to make it not restart?

I thinks what is happening is that for a callback to update a collection in mongoose I do a writeFile to all.json and I think that is causing my nodemon to restart. The cmd window: file saved [nodemon] restarting due to changes... { ok: 1,…
jack blank
  • 5,073
  • 7
  • 41
  • 73
19
votes
5 answers

Nodemon is not working in Docker environment

I'm using Docker with fig to build NodeJS dev-env. While I using nodemon to watch the server.js, changing server.js won't restart the server. CMD ["nodemon", "/nodeapp/server.js"] But while I changed from nodemon to supervisor, then it worked! CMD…
kerkerj
  • 193
  • 1
  • 1
  • 6
18
votes
2 answers

Error cause property not recognized in TypeScript

I stumbled upon the possibility to add a cause to the Error constructor in javascript. But when I try to use this feature my app does not start as it does not know this "new" constructor arg. > tsc && node…
andymel
  • 4,538
  • 2
  • 23
  • 35
18
votes
2 answers

Nodemon and/or Hot Reloading with a Node-React Web App

I'm still pretty new when it comes to configuring a web app with webpack to create an optimal dev experience. I've taken two different Node-React courses: one where we used nodemon for tracking changes and another where we implemented hot…
orpheus
  • 1,060
  • 2
  • 15
  • 23
18
votes
2 answers

Nodemon not refreshing browser in React-Express-Node App

I have installed nodemon locally in my workspace, but even though it restarts in the terminal after changes are made, it does not refresh the browser page. I have to manually refresh it each time. I've got Express, Node, React and Webpack running in…
Manish Giri
  • 3,562
  • 8
  • 45
  • 81
18
votes
5 answers

Node.js - Auto Refresh In Dev

I am trying to improve the DEV experience in my Node. To do that, I want to: a) restart my server when server-side code is changed b) refresh the browser when client-side code is changes. In an effort to accomplish this, I began integrating…
JQuery Mobile
  • 6,221
  • 24
  • 81
  • 134
1 2
3
90 91