nodemon

Nodemon inspect/debug not working?

北战南征 提交于 2019-12-01 03:31:46
Running nodemon --inspect index.js or nodemon --debug index.js doesn't work. Node Version : 8.9.1 Nodemon Version : 1.12.6 I have tried these with no luck : nodemon --inspect-brk index.js nodemon -- --inspect index.js nodemon index.js -- --inspect index.js nodemon index.js -- --debug index.js nodemon -- --debug index.js nodemon --inspect --debug index.js nodemon --debug-brk index.js But node --inspect index.js or node --inspect-brk index.js works. I wonder how? If any alternatives or some kinda workaround would be great too. Please comment if you need further description. SOLVED , It seems

Nodemon inspect/debug not working?

社会主义新天地 提交于 2019-12-01 00:51:13
问题 Running nodemon --inspect index.js or nodemon --debug index.js doesn't work. Node Version : 8.9.1 Nodemon Version : 1.12.6 I have tried these with no luck : nodemon --inspect-brk index.js nodemon -- --inspect index.js nodemon index.js -- --inspect index.js nodemon index.js -- --debug index.js nodemon -- --debug index.js nodemon --inspect --debug index.js nodemon --debug-brk index.js But node --inspect index.js or node --inspect-brk index.js works. I wonder how? If any alternatives or some

Auto-starting Node.js application on Vagrant when there are changes to code

拈花ヽ惹草 提交于 2019-11-30 16:23:52
I'm running a Node.js application on a Vagrant box and want the Node.js application to restart when anything changes on the host machine. But I couldn't use nodemon . It doesn't pick up the changes in time. When I use the -L flag, it consumes too much CPU on the guest machine. These are currently well-known issues . I've also tried Vagrant's rsync-auto , but it wasn't responsive enough for some reason. Is there a workaround? Perhaps something I can apply on the host machine? There seem to be other tools you can try on the guest machine as alternatives to nodemon, but watching for file changes

Can Visual Studio Code be configured to launch with nodemon

徘徊边缘 提交于 2019-11-30 10:45:23
问题 I have installed nodemon as a global package in my system. It works when I executed nodemon in cmd. But when I am using vscode with this launch.json file, vscode throws this exception: request launch: runtime executable XXX\XXX\XXX\XXX\nodemon does not exists the launch.json is: { "version": "0.2.0", "configurations": [ { "name": "Launch", "type": "node", "request": "launch", "program": "app.js", "stopOnEntry": false, "args": [], "cwd": ".", "runtimeExecutable": nodemon, "runtimeArgs": [ "-

Nodemon Doesn't Restart in Windows Docker Environment

情到浓时终转凉″ 提交于 2019-11-30 04:44:14
My goal is to set up a Docker container that automatically restarts a NodeJS server when file changes are detected from the host machine. I have chosen nodemon to watch the files for changes. On Linux and Mac environments, nodemon and docker are working flawlessly. However, when I am in a Windows environment , nodemon doesn't restart the server. The files are updated on the host machine, and are linked using the volumes parameter in my docker-compose.yml file. I can see the files have changed when I run docker exec <container-name> cat /path/to/fileChanged.js . This way I know the files are

Auto-starting Node.js application on Vagrant when there are changes to code

岁酱吖の 提交于 2019-11-30 00:08:06
问题 I'm running a Node.js application on a Vagrant box and want the Node.js application to restart when anything changes on the host machine. But I couldn't use nodemon. It doesn't pick up the changes in time. When I use the -L flag, it consumes too much CPU on the guest machine. These are currently well-known issues. I've also tried Vagrant's rsync-auto, but it wasn't responsive enough for some reason. Is there a workaround? Perhaps something I can apply on the host machine? 回答1: There seem to

Is there a way to use npm scripts to run tsc -watch && nodemon --watch?

不羁岁月 提交于 2019-11-29 22:56:58
I'm looking for a way to use npm scripts to run tsc --watch && nodemon --watch at the same time. I can run this commands independently, but when I want run both of them, only the first one is executed. eg. if I have this script: "scripts": { "runDeb": "set NODE_ENV=development&& tsc --watch && nodemon --watch" } tsc --watch is executed but nodemon is never called, and vice versa. I think what you want is something like this (my current setup): "scripts": { "compile": "tsc && node app.js", "dev": "./node_modules/nodemon/bin/nodemon.js -e ts --exec \"npm run compile\"" } I created two scripts

Can Visual Studio Code be configured to launch with nodemon

落爺英雄遲暮 提交于 2019-11-29 22:53:09
I have installed nodemon as a global package in my system. It works when I executed nodemon in cmd. But when I am using vscode with this launch.json file, vscode throws this exception: request launch: runtime executable XXX\XXX\XXX\XXX\nodemon does not exists the launch.json is: { "version": "0.2.0", "configurations": [ { "name": "Launch", "type": "node", "request": "launch", "program": "app.js", "stopOnEntry": false, "args": [], "cwd": ".", "runtimeExecutable": nodemon, "runtimeArgs": [ "--nolazy" ], "env": { "NODE_ENV": "development" }, "externalConsole": false, "preLaunchTask": "",

nodemon command is not recognized in terminal for node js server

时光总嘲笑我的痴心妄想 提交于 2019-11-29 22:43:08
I am doing node.js server setup from https://scotch.io/tutorials/authenticate-a-node-js-api-with-json-web-tokens . I am new in node.js. I am installing npm install nodemon --save . But when I am run the server with this nodemon server.js . In the terminal showing: nodemon is not recognized as internal or external command, operable program or batch file node server.js command is working and started the server, But nodemon command is not working. I am set up the node js server from https://scotch.io/tutorials/authenticate-a-node-js-api-with-json-web-tokens video. I don't know why it is not

package.json 详解

这一生的挚爱 提交于 2019-11-29 21:14:13
Node 项目在项目根目录中名为 package.json 的文件中跟踪依赖关系和元数据。这是你项目的核心。它包含名称、描述和版本之类的信息,以及运行、开发以及有选择地将项目发布到 NPM 所需的信息。 在本教程中,我们将: 了解 package.json 与项目之间的关系 确定重要字段和元数据 了解如何管理 package.json 目标 了解什么是 package.json 文件,它与你项目的关系以及需要了解的常见属性。 了解 package.json 如果你以前用过 Node.js,则可能会遇到 package.json 文件。它是一个 JSON 文件,位于项目的根目录中。你的 package.json 包含关于项目的重要信息。它包含关于项目的使人类可读元数据(如项目名称和说明)以及功能元数据(如程序包版本号和程序所需的依赖项列表)。 package.json 示例如下所示: { "name": "my-project", "version": "1.5.0", "description": "Express server project using compression", "main": "src/index.js", "scripts": { "start": "node index.js", "dev": "nodemon", "lint": "eslint **/