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

Why I'm getting Error [ERR_MODULE_NOT_FOUND]: Cannot find module when running the server

I'm doing a startup server. Basically It has initial setup with express and nodemon dependencies. Unfortunately, I'm getting ERR_MODULE_NOT_FOUND when running yarn dev or npm run dev Here is the code and file structure I have.
Raymond
  • 71
  • 1
  • 1
  • 7
4
votes
0 answers

Preload dotenv through package.json script

I'm trying to preload dotenv variables directly through a npm script and it's not working. According to dotenv docs they mention: You can use the --require (-r) command line option to preload dotenv. By doing this, you do not need to require and…
4
votes
2 answers

TypeScript: "Left side of comma operator is unused and has no side effects" error in development environment

Problem When I'm trying to start my development environment with npm run dev:server I'm getting this error: return new TSError(diagnosticText, diagnosticCodes); ^ TSError: ⨯ Unable to compile TypeScript: src/routes/snippets.ts:6:26 -…
Paul Ulibro
  • 315
  • 2
  • 6
  • 12
4
votes
6 answers

Command failed: wmic process after updating npm in Express app

In my app.js, const app = require("express")(); const port = 3000; app.get("/", (req, res) => { res.send("hello world"); }); app.listen(port, () => { console.log("server running!"); }); This error generated after I save / update the app.js…
Dinesh Rout
  • 91
  • 2
  • 8
4
votes
1 answer

Nodemon and Jest, only supported when running Babel asynchronously

I'm trying to run Jest and this error keeps preventing me from running any tests: Error while loading config - You appear to be using a native ECMAScript module configuration file, which is only supported when running Babel asynchronously. at…
Leonardo Bezerra
  • 668
  • 1
  • 10
  • 20
4
votes
1 answer

How to run Nodemon with TypeScript in debug mode in WebStorm

I have a very basic Express server setup with NodeJS/Express + Nodemon. I'm using WebStorm as my IDE. When running the debug/inspect script, my application is throwing a compile-time error. Following the instructions here, and cognizant of the post…
tmptplayer
  • 434
  • 7
  • 18
4
votes
2 answers

BrowserSync with Nodemon and Express Server

For the life of me I can't get Browser Sync and Nodemon to run nicely alongside my Express server. I have tried every combination I can imagine. My Express server runs at port 5000 which I can open and view, nodemon runs when changes are made, great…
ZADorkMan
  • 301
  • 4
  • 19
4
votes
0 answers

Nodemon doesn't watch for .env files

I have the following code structure: --src ----config ------env --------development.env --------index.js Here's my nodemon.json file: { "watch": ["src"], "events": { "start": "cls || clear" } } It works when I make a change to…
Ayoub k
  • 7,788
  • 9
  • 34
  • 57
4
votes
1 answer

How to run nodemon + forever in the background

Good morning! I need my node.js server running in the background. I just saw this answer: Forever + Nodemon running together I understand the idea, and I think that it's great, but when I use forever -c "nodemon --exitcrash" app.js the nodemon…
Axel León
  • 426
  • 6
  • 17
4
votes
6 answers

Why do I get "nodemon cannot be loaded" in my VS Code terminal?

I installed Nodemon locally and globally, but in both cases I get the same error: Nodemon : File C:\Users\xxx\AppData\Roaming\npm\nodemon.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see…
roman
  • 51
  • 1
  • 2
  • 4
4
votes
3 answers

ts-node-dev doesn't apply changes in auto reload

I have built an application using FeathersJS in Typescript but althought the nodemon for typescript (ts-node-dev) says that the server has restarted when a typescript file is changed, the change is not applyed. I always need to kill the application…
4
votes
1 answer

Using TypeScript and nodemon: SyntaxError: Cannot use import statement outside a module

I am converting the code to use nodemon to leverage TypeScript. In my package.json: "scripts": { "serve-fake-api": "nodemon fake-api/server.ts --watch 'fake-api/*.*' ", "serve-vue": "vue-cli-service serve", "serve": "concurrently -k…
Natalie Perret
  • 8,013
  • 12
  • 66
  • 129
4
votes
1 answer

npm install failed at the nodemon@1.18.9 postinstall script

the commands 'npm install' gives me the following error: > nodemon@1.18.9 postinstall C:\Users\Nikhil\Music\tab-tracker\server\node_modules\nodemon > node bin/postinstall || exit 0 npm WARN server@1.0.0 No description npm WARN server@1.0.0 No…
lenikhilsingh
  • 553
  • 2
  • 7
  • 20
4
votes
3 answers

How to define custom nodemon configuration in nodemonConfig in package.json?

I tried implementing custom nodemon configuration in package.json as shown below: "nodemonConfig": { "watch": ["server", "bin/www"], "ext": "ts", "ignore": ["*.test.ts"], "delay": "3000", "execMap": { "ts": "ts-node" } …
ankurnarkhede
  • 378
  • 1
  • 4
  • 9
4
votes
2 answers

Error: listen EADDRINUSE when using nodemon with babel 7

nodemon -v: 1.18.6 node -v: v11.2.0 Command: nodemon --exec babel-node lib/server.js My app starts ok with the above command. When I change the source code, I expect the nodemon restart automatically. But I got the error Error: listen EADDRINUSE:…
Long Tran
  • 1,885
  • 15
  • 10