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
14
votes
2 answers

Gulp Watch and Nodemon conflict

Short of it: started using Gulp recently (convert from Grunt), and am trying to use both Gulp's default watch task (not gulp-watch from npm) for SASS/JS/HTML and gulp-nodemon (from npm) to restart an Express server upon changes. When running just…
jiveTurkey
  • 689
  • 3
  • 7
  • 17
13
votes
4 answers

Node.js Heroku Deployment on Mac - sh: 1: nodemon: not found / npm ERR! `nodemon fileName.js` / npm ERR! Failed at the...start script

Deploying on Heroku with Node.js using Mac My issue: State changed from starting to crashed && sh: 1: nodemon: not found && Failed at...start script && status 1...code=H10 After creating my front-end, with React, back-end server, with…
Q.McKinley
  • 551
  • 1
  • 4
  • 11
13
votes
1 answer

nodemon is slow to restart the server

I've recently reinstalled node package manager npm install nodemon -g which grabbed the latest build. But when I run nodemon server.js and I save changes to files, it's extremely slow to restart the server. It might take 10-30 seconds to detect file…
chasnz
  • 179
  • 1
  • 6
13
votes
6 answers

How to use nodemon in npm scripts to build and start scripts?

"scripts": { "build": "babel src -d lib", "start": "node --use_strict ./lib/index.js", "watch": "nodemon lib/index.js --exec npm run build" } Using the command npm run watch results in the following wrong command being run: [nodemon] starting…
Connorelsea
  • 2,308
  • 6
  • 26
  • 47
12
votes
3 answers

TypeError: handlebars is not a function

i have made the handlebars template config on my index.js file, but when i try to run my code with nodemon he returns me this error. anyone can help? enter image description here enter image description here
Marilia Soares
  • 121
  • 1
  • 1
  • 4
12
votes
3 answers

Cannot get nodemon/ts-node-dev working on dockerized mean stack

Brand new to the Mean Stack but have managed to get one set up in a dockerized environment by following various tutorials. I mainly used the one explained at…
John Cogan
  • 1,034
  • 4
  • 16
  • 39
12
votes
2 answers

nodemon : Passing arguments to the executable when using as a required module

I'm trying to start a script with nodemon, using it as a required module, and I cannot pass arguments correctly. For example, for var args = [ process.argv[0], '--harmony', '/path/to/script.js', '-i', 'logs' ];` I'm expecting the script to…
Yanick Rochon
  • 51,409
  • 25
  • 133
  • 214
11
votes
5 answers

ts-node-dev not restarting when changes made

Here are my files : package.json : "scripts": { "generate-interfaces": "ts-node src/cli/generate-interfaces.ts", "dist": "npm run generate-interfaces && rm -rf dist && tsc && cp -r static/ dist/ && cp -r resource/ dist/", "prestart": "npm run…
Himanshu Teotia
  • 2,126
  • 1
  • 27
  • 38
11
votes
4 answers

How to deploy MERN stack to a hosting service?

I am new to web development and I have a hosting service on which I want to deploy my reactjs/node project. To deploy it previously, I had been simply uploading the build folder created from running npm run build. I have since added a connection to…
Meghan King
  • 185
  • 2
  • 3
  • 7
11
votes
1 answer

How to hide the yellow console.logs in nodemon

Is it possible to hide the yellow logs that displays when you start en watch with nodemon? below is displayed in yellow in the console. [nodemon] 1.11.0 [nodemon] to restart at any time, enter `rs` [nodemon] watching:…
Raymond the Developer
  • 1,576
  • 5
  • 26
  • 57
11
votes
1 answer

webpack-dev-server vs nodemon

Are there any (dis)advantages in using webpack-dev-server over nodemon. Does anybody have real experience with it? I am used to nodemone and I know it can be used in production too. Whereas webpack-dev-server is suitable for dev only.
Amio.io
  • 20,677
  • 15
  • 82
  • 117
10
votes
3 answers

How to fix Nodemon "async remove {}" syntax error?

Whenever I try to run nodemon to auto-restart my local server (running on port 3000), I get this error message regarding a syntax error in the no /Users/SI23/.nvm/versions/node/v6.5.0/lib/node_modules/nodemon/node_modules/chokidar/index.js:151 …
SI23
  • 119
  • 1
  • 5
10
votes
1 answer

nodemon not running due to requires update notifier package

When I typed "nodemon server.js" command in the terminal, it returns the error "require('update-notifier')({ pkg }).notify();". The version of nodemon installed is nodemon@1.17.3 Below are the javascript and html used. var express =…
kaizen
  • 1,580
  • 4
  • 26
  • 50
10
votes
2 answers

Can I run two ongoing npm commands in 1 terminal

I have these 2 commands in my npm scripts "scripts": { "webpack": "webpack --config webpack.config.js --watch", "server": "nodemon server.js", } As you can see, one runs webpack every time I save a file and one just runs the server with nodemon so…
TheGreyBearded
  • 357
  • 6
  • 15
10
votes
6 answers

Nodemon + babel restart the server multiple times

In my package.json I have a start-script which I'm using for my dev enviroment. It looks like this: "scripts": { "dev": "NODE_PATH=src nodemon --watch src/ --exec babel-node src/app.js" } When I'm hitting npm run dev everything works fine and…
Jonathan Nielsen
  • 1,442
  • 1
  • 17
  • 31