{"id":10407,"library":"nodemon","title":"Nodemon","description":"Nodemon is a development utility that automatically restarts Node.js applications when file changes are detected in the directory. It serves as a replacement wrapper for the `node` command, requiring no code modifications to integrate. The current stable version is 3.1.14, and the project maintains an active release cadence, frequently publishing minor updates and bug fixes.","status":"active","version":"3.1.14","language":"javascript","source_language":"en","source_url":"https://github.com/remy/nodemon","tags":["javascript","cli","monitor","development","restart","autoload","reload","terminal","typescript"],"install":[{"cmd":"npm install nodemon","lang":"bash","label":"npm"},{"cmd":"yarn add nodemon","lang":"bash","label":"yarn"},{"cmd":"pnpm add nodemon","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[],"quickstart":{"code":"npx nodemon ./src/index.ts","lang":"typescript","description":"Starts your TypeScript application using Nodemon, which will automatically restart the process whenever changes are detected in your project files, typically within the `src` directory."},"warnings":[{"fix":"If installed locally, use `npx nodemon your-app.js` or define an npm script like `\"start\": \"nodemon your-app.js\"`.","message":"When installing Nodemon locally (`npm install --save-dev nodemon`), the `nodemon` command will not be directly available in your system's PATH. You must run it via an npm script or by using `npx nodemon`.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Always use `nodemon` as the primary command to launch your application, passing your application script and arguments directly to `nodemon`.","message":"Nodemon is a command-line wrapper. You should replace `node` with `nodemon` when executing your script, e.g., `nodemon your-app.js`. Do not try to run it as `node nodemon your-app.js`.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Be aware of this precedence when troubleshooting configuration issues. Check command-line args first, then local `nodemon.json`, then global `nodemon.json`.","message":"Nodemon allows configuration through command-line arguments, local `nodemon.json`, and global `nodemon.json` files. Command-line arguments always take precedence over local config, which in turn overrides global config.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Explicitly specify the script you want to run (e.g., `nodemon server.js`) or verify that your `package.json` `main` or `scripts.start` points to the correct entry file.","message":"If your `package.json` has a `main` property or a `scripts.start` command, Nodemon will automatically attempt to use that script if no specific file is provided on the command line. This can lead to running a different script than expected.","severity":"gotcha","affected_versions":">=1.1.0"},{"fix":"Do not attempt to import or require `nodemon` within your Node.js application files. Use it exclusively from the command line or through npm scripts.","message":"Nodemon is designed as a command-line tool and is not intended for direct `import` or `require` into your application code. It operates as an external process manager.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-18T00:00:00.000Z","next_check":"2026-07-17T00:00:00.000Z","problems":[{"fix":"Install globally: `npm install -g nodemon`. If installed locally, run with `npx nodemon your-app.js` or via an npm script.","cause":"Nodemon is not installed globally or is installed locally and not executed via `npx` or an npm script.","error":"nodemon: command not found"},{"fix":"Ensure the script file exists at the specified path and that the `main` or `scripts.start` entry in `package.json` is correct.","cause":"Nodemon attempted to start a script specified in `package.json` (via `main` or `scripts.start`) or on the command line, but the file does not exist or the path is incorrect.","error":"script.start with missing file"},{"fix":"Update Nodemon to the latest version (`npm update nodemon`). Verify your `nodemon.json` does not accidentally ignore the directories you want to watch or explicitly configure `\"watch\": [\"src/\"]`.","cause":"This could be due to an older version of Nodemon (fixed in v3.1.6) or an incorrect `watch` or `ignore` configuration in `nodemon.json`.","error":"Nodemon is not watching nested paths or subdirectories for changes."},{"fix":"Update Nodemon and its corresponding TypeScript types: `npm update nodemon @types/nodemon`.","cause":"Your `@types/nodemon` package is outdated or incompatible with your installed `nodemon` version, or there's a missing type definition for a newer feature.","error":"TypeError: Property 'restart' does not exist on type 'Nodemon' or similar TypeScript type errors related to Nodemon configuration options like 'ignore'."},{"fix":"Update Nodemon to the latest version (`npm update nodemon`) to ensure you have the most recent fixes for Windows compatibility.","cause":"There are known platform-specific issues with file system watching on Windows that have been addressed in recent Nodemon versions.","error":"Nodemon is not detecting file changes on Windows."}],"ecosystem":"npm"}