【问题标题】:nodemon exclude folders/files not working - win10nodemon 排除文件夹/文件不起作用 - win10
【发布时间】:2021-11-18 01:29:18
【问题描述】:

Nodemon - exclusion of files这是一个很受欢迎的问题,但很多人都无法解决问题,包括我自己。

我将不得不解决这个问题(我无法移动我的 index.js 文件),所以我会在找到解决方案时发布我的解决方案。

Aviator@AW:/mnt/c/Users/Adrian$ nodemon index.js --ignore exclude_nodemon.json
[nodemon] 2.0.13
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node index.js`
Hello
[nodemon] Internal watch failed: EBADF: bad file descriptor, watch '/mnt/c/Users/Adrian/AppData/Local/ElevatedDiagnostics'
Aviator@AW:/mnt/c/Users/Adrian$

exclude_nodemon.json 的内容:

{
      "verbose": true,
        "ignore": ["*.test.js", "AppData/*"],
}

也试过了:

nodemon index.js --ignore "AppData/*" 
nodemon index.js --ignore 'AppData/*' 

但结果是一样的。

已尝试:nodemon index.js --ignore AppData/
得到了[nodemon] Internal watch failed: EBADF: bad file descriptor, watch /mnt/c/Users/Adrian/Local Settings/ElevatedDiagnostics
已尝试:nodemon index.js --ignore AppData/ Local\ Settings/
得到:[nodemon] starting `node index.js "Local Settings/"
同样的错误。
试过了:nodemon index.js --ignore AppData/, Local\ Settings/
同样的错误。

【问题讨论】:

    标签: node.js nodemon


    【解决方案1】:

    nodemon index.js --ignore AppData/ --ignore Local\ Settings/

    【讨论】:

      猜你喜欢
      • 2015-05-26
      • 2014-07-29
      • 1970-01-01
      • 2019-11-07
      • 2023-02-25
      • 2015-07-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多