nodemon

single quotes not working in package.json

此生再无相见时 提交于 2019-12-12 11:14:06
问题 I'd like to get my package.json to be able to run using the command npm run test-watch on Windows 10 with npm 5.5.1. In my package.json: "scripts": { "test": "mocha server/**/*.test.js", "test-watch": "nodemon --exec 'npm test'" } However, I this interpretes the code strangely to have a single quote in there. I'm actually following a Udemy course so it appears to work for the instructor. However, here is the output I get: PS D:\courses\node-course\node-todo-api> npm run test-watch > todo-api

Grunt Connect , Nodemon same port issue

别等时光非礼了梦想. 提交于 2019-12-12 03:33:51
问题 I am trying to run angular admin template and node server by grunt and nodemon.All runs well..Problem is when i try to send any request from client-side to server-side its showing 404 error. For both i am using same port which is 2300. If i change the port number of server.js then it returns result..I can not run them by same port. I am sending request http://localhost:2300/test Here is my Gruntfile : // Generated on 2015-01-21 using generator-angular 0.9.2 'use strict'; // # Globbing // for

App crashed in nodemon

岁酱吖の 提交于 2019-12-12 01:49:21
问题 I am trying to run in debug mode using Git Bash a nodejs application. I did it several times but on the recent ones it doesn't work anymore. When I run the command: npm run startwindows:inspect it says: 14 Apr 15:10:59 - [nodemon] v1.4.1 14 Apr 15:10:59 - [nodemon] to restart at any time, enter `rs` 14 Apr 15:10:59 - [nodemon] ignoring: C:\XXX\.git/**/* C:\XXX\node_modules/**/* C:\XXX\bower_components/**/* .sass-cache 14 Apr 15:10:59 - [nodemon] watching: C:\XXX\server/**/* C:\XXX\config

Using browsersync with gulp/nodemon

痴心易碎 提交于 2019-12-11 08:02:01
问题 I'm trying to get Browsersync (version 2.12.5) to work with gulp-nodemon/watching files. These are my gulp tasks. I can't seem to get any of my files to update/reload the browser. var $ = require('gulp-load-plugins')(); var browserSync = require('browser-sync'); var gulp = require('gulp'); // load in gulp tasks etc...... gulp.task('server', function() { return $.nodemon({ script: 'server.js' }); }); gulp.task('browser-sync', ['server'], function() { browserSync.init({ proxy: 'http://localhost

Nodemon not using the --ignore option

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 07:37:23
问题 I am using Nodemon on an Expressjs project. I have the following in my package.json: "start": "nodemon server.js --ignore 'src/**'" I have tried several variations of the ignore glob, but every time, it still restarts when a file in 'src/' changes. What do I need to do to get Nodemon to ignore the src directory? Thanks. 回答1: You can try to add a config nodemon.json with content below: { "verbose": true, "ignore": ["src/*"] } "start": "nodemon server.js --config nodemon.json" Ref: https:/

Nodemon runs multiple times on save when using babel

↘锁芯ラ 提交于 2019-12-11 06:26:35
问题 I am using Nodemon and Babel 6. I have uninstalled Nodemon globally and have installed the latest version. I have tried both of the following lines in my npm scripts: "watch-new": "nodemon src/index.js --exec babel-node" And "watch-new": "nodemon src/index.js --exec babel -w src/ -d build/ --source-maps" Changes in running babel seem to result in similar/identical nodemon-related mess-ups. I started with a file that simply contained console.log("Hello, World!"); then added a line after that

Configure nodemon to refresh same tab

吃可爱长大的小学妹 提交于 2019-12-10 12:16:50
问题 This could be really rookie. I want to know if there is a way that I can configure nodemon to refresh the same tab instead of opening a new tab each time I make a change in my js files. 回答1: nodemon is not able to do that. What you are looking for is something like browser-sync or LiveReload.js. 来源: https://stackoverflow.com/questions/51465195/configure-nodemon-to-refresh-same-tab

Unable to get TypeScript watching my project and nodemon reloading it

可紊 提交于 2019-12-10 10:57:11
问题 Command tsc -w -p server watch the server directory compile TypeScript into dist/server folder ( dist/server/app.js is the main Node script). Command nodemon -w dist/server dist/server/app.js watches dist/server folder and reloads dist/server/app.js when something changes. The problem: if I run both commands in parallel , tsc will take some times but nodemon starts too soon, when dist/server/app.js doesn't exist yet. concurrently \"tsc -w -p server\" \"nodemon -w dist/server dist/server/app

nodemon is not restarting the server when using node-java package

☆樱花仙子☆ 提交于 2019-12-10 10:37:26
问题 When using node-java package, nodemon doesn't restart when the files change. If I remove node-java package then nodemon will restart when there are file changes. Even the manual restart (rs) is not working when using node-java package in server. Following is the behavior. alon And even it throws the following: events.js:85 throw er; // Unhandled 'error' event ^ Error: listen EADDRINUSE at exports._errnoException (util.js:746:11) at Server._listen2 (net.js:1156:14) at listen (net.js:1182:10)

how to do linting using nodemon?

拟墨画扇 提交于 2019-12-09 09:25:56
问题 Can I use nodemon to lint my javascript? I am not using any build tool e.g. gulp or grunt and want to maximize the use of node and npm. The output from nodemon can be piped. I want to use this for linting the changed file using eslint. Here is my package.json { "name": "app", "version": "0.0.1", "private": true, "scripts": { "start": "nodemon server.js", "lint": "eslint" }, "dependencies": { "MD5": "*", "clean-css": "*", "express": "~4.9.0", "express-handlebars": "~2.0.1", "express-redis