nodemon启动无限.node-xmlhttprequest-sync文件

时间:2018-04-11 11:26:22

标签: javascript node.js nodemon

我有一个导入具有承诺的模块的应用程序。

使用“node app.js”

启动它时工作正常

然而,当我启动“nodemon”时,它会不断创建文件.node-xmlhttprequest-sync-1516(最后的随机数字)

以前有人遇到过这个问题吗?在Google上找不到任何答案...非常感谢!

nodemon
[nodemon] 1.17.3
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node app.js`
app running on port 3100
app running on port 8080
secs:38.409
[nodemon] restarting due to changes...
[nodemon] starting `node app.js`
app running on port 3100
app running on port 8080
secs:0.615
[nodemon] restarting due to changes...
[nodemon] starting `node app.js`
app running on port 3100
app running on port 8080
secs:0.661
[nodemon] restarting due to changes...
[nodemon] starting `node app.js`
app running on port 3100
app running on port 8080
secs:0.593
[nodemon] restarting due to changes...
[nodemon] starting `node app.js`
app running on port 3100
app running on port 8080
secs:0.59
[nodemon] restarting due to changes...
[nodemon] starting `node app.js`
app running on port 3100
app running on port 8080
secs:0.603
[nodemon] restarting due to changes...
[nodemon] starting `node app.js`
app running on port 3100
app running on port 8080
secs:0.597
[nodemon] restarting due to changes...
[nodemon] starting `node app.js`
^CTerminate batch job (Y/N)? y

1 个答案:

答案 0 :(得分:1)

您正在关注*.*的变化。您的服务器可能在某个时刻正在编写文件,这导致服务器重新启动,这种情况一再发生。查看有关如何忽略某些文件/文件夹的docs