Tag: nodemon

nodemon,主pipe,永远都给不同的错误,有什么build议吗?

我已经尝试了所有三个一个一个地安装在全球范围内。 但似乎没有工作。 我正在使用这些重新启动服务器时,我做任何更改。 以下是我正在使用的命令。 nodemon npm start forever npm start supervisor npm start 来自主pipe的错误 Error: Cannot find module 'E:\dv\MEAN Lynda – Developing for the MEAN Stack and MongoDB\projects\project\start' at Function.Module._resolveFilename (module.js:339:15) at Function.Module._load (module.js:290:25) at Function.Module.runMain (module.js:447:10) at startup (node.js:142:18) at node.js:939:3 Program node start exited with code 1 Starting child process with 'node start' […]

VS代码自动重新启动debugging器的文件保存像nodemon

当源文件像nodemon一样变化时,有没有办法在VS Code中自动重启节点debugging器?

找不到nodemon命令

当我input“nodemon”时,出现以下错误:“bash:nodemon:command not found”。 我已经尝试过在本地和全球范围内安装它,而且昨天它已经正常工作,我不记得我已经改变了什么,所以它不再工作。 我正在使用Git Bash shell。 当我安装nodemon时,我得到以下输出: $ npm install nodemon –save webdev@1.0.0 C:\users\corfi\Google Drive\coding\webdev\site `– nodemon@1.11.0 +– chokidar@1.7.0 | +– anymatch@1.3.2 | | +– micromatch@2.3.11 | | | +– arr-diff@2.0.0 | | | | `– arr-flatten@1.1.0 | | | +– array-unique@0.2.1 | | | +– braces@1.8.5 | | | | +– expand-range@1.8.2 | […]

nodemon应用程序崩溃时运行此“npm运行testing手表”

在我的package.json文件中,我编写了这个运行nodemon: "scripts": { "test": "mocha server/**/*.test.js", "test-watch": "nodemon –exec 'npm test'" },这个错误在terminal显示: > node-todo-api@1.0.0 test-watch D:\nodepractice\node-todo-api > nodemon –exec 'npm test' [nodemon] 1.12.0 [nodemon] to restart at any time, enter `rs` [nodemon] watching: *.* [nodemon] starting `'npm test'` ''npm' is not recognized as an internal or external command, operable program or batch file. [nodemon] app […]

Nodemon内部监视失败的错误?

我不知道发生了什么,但突然间我的Nodemon开始显示错误。 nikhil@nikhil-Lenovo-Z50-70:~/Desktop/dominos$ nodemon server.js [nodemon] 1.12.1 [nodemon] to restart at any time, enter `rs` [nodemon] watching: *.* [nodemon] starting `node server.js` [nodemon] Internal watch failed: watch /home/nikhil/Desktop/dominos ENOSPC 即使在那之后我的程序运行良好。 但是当我closures这个project1并在同一个端口上运行另一个project2时,就会发生这个错误 Error: listen EADDRINUSE :::3000 at Object.exports._errnoException (util.js:1024:11) at exports._exceptionWithHostPort (util.js:1047:20) at Server.setupListenHandle [as _listen2] (net.js:1319:14) at listenInCluster (net.js:1367:12) at Server.listen (net.js:1467:7) at Object.<anonymous> (/home/nikhil/Desktop/dominos/server.js:533:8) at […]

使用相同path中的Nodemon启动多个Express应用程序

如何从同一根文件夹启动不同的Express应用程序? 使用多个terminal窗口是可以接受的。 我很乐意使用nodemon和参数: nodemon 'landing' nodemon NODE_APP='app02' NODE_APP='app02' nodemon 我目前直接使用node 。 这工作,但不给我的能力来观看文件夹: NODE_APP='app02' node ./server/server.js 不幸的是,我找不到允许这个的nodemon任何组合。 正如你可以从我的文件夹结构看到的,所有的服务器资源是共享的: client common <- Express static path 'common' assets directives modules vendor landing <- App 01 modules <- Modules specific to App 01. app.js index.html signup <- App 02 modules <- Modules specific to App 02. app.js index.html members […]

Nodemon说它重新启动我的服务器,但它不

当我更改源时,使用nodemon重新启动我的node express服务器。 当我改变任何东西的时候, nodemon正确地发现了更改后的文件并宣称重新启动服务器: [nodemon] restarting due to changes… 但是,当我与服务器交互时,我仍然得到了旧的行为(直到我手动重新启动服务器)。 我通过设置envvariablesBABEL_DISABLE_CACHE=1 (工作,没有〜/ .babel.json被创build)来禁用babel的caching。 有一些其他的caching我应该禁用,以获得正确的行为? 任何想法,为什么发生这种情况? 节点:5.1.0 nodemon:1.8.1 平台:ArchLinux 更新:这可能不是caching问题。 我注意到,保存我的文件后, nodemon不会杀死subprocess; 旧的node仍在运行( nodemon应该杀死旧的进程,并开始一个新的,对不对?)手动杀死我的脚本工作没有任何问题。

如何防止grunt-nodemon重新启动所有应用程序

我在Windows 10上运行节点。我有三个节点应用程序,我希望能够用一个方便的grunt命令启动它们。 此外,我希望节点自动重新启动,如果我修改任何应用程序。 我正在使用grunt-nodemon和grunt-concurrent的组合。 节点进程全部启动正常。 问题是,如果我修改相关的代码,他们都重新启动,这需要很长的时间。 我怎样才能使nodemon只重新启动其实际修改的代码的应用程序? var loadGruntTasks = require('load-grunt-tasks') module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), concurrent: { runAll: { tasks: ['nodemon:app1', 'nodemon:app2', 'nodemon:app3'], options: { logConcurrentOutput: true } } }, nodemon: { app1: { script: './app1/app.js' }, app2: { script: './app2/app.js' }, app3: { script: './app3/app.js' } } }) loadGruntTasks(grunt) grunt.registerTask('default', ['concurrent:runAll']) […]

Nodemon + Express 4.13.4

我失去了我的想法,试图使用Express 4正确运行Nodemon;)我已经安装了npm,并将我的package.json更改为 "scripts": { "start": "nodemon ./bin/www" }, 我使用…启动服务器 npm start 如果我然后对routes.js文件进行任何编辑,则不需要进行更改。 即使我刷新浏览器。 运行ps aux |之后 grep节点我得到以下.. 看来Nodemon AND节点服务器都在运行。 有没有其他人看到这一点,理解为什么? 或如何解决它? 谢谢。 *更新这是我的控制台输出,而服务器正在运行。

在server.js中需要loki inMemory数据库导致nodemon不断重启

项目回购 安装lokijs后,我创build了以下的database.js文件: var loki = require('lokijs'); var db = new loki('db.json'); db.addCollection('top').insert([ { term: 'JavaScript' , style : 'warning' }, { term: 'Angular 2' , style : 'danger' }, { term: 'NodeJS' , style : 'success' }, { term: 'REST' , style : 'primary' } ]); db.addCollection('searches'); db.saveDatabase(); 只要我添加require('./database.js'); 在我的server.js文件中,nodemon在重启循环中被捕获。 nodemon main var express = […]