节点崩溃:类型错误:无法读取 null 的属性"__nodemonRestart"



我使用Nodemon与Node.js(VS Code IDE(一起运行我的代码。我只是一个初学者,需要一些指导来解决此问题。每次代码中出现错误时,Nodemon 都会开始崩溃(我在 VS Code 中选择了自动保存选项(。错误如下:

at Function.Module._load (internal/modules/cjs/loader.[nodemon] app crashed - waiting for file changes before starting...
C:UsersbobsaAppDataRoamingnpmnode_modulesnodemonlibmonitorrun.js:149
if (child.__nodemonRestart) { // this flag is set right before the kill
^
TypeError: Cannot read property '__nodemonRestart' of null

我必须更改 run.js 文件中的"__nodemonRestart"吗?我已经用最新版本更新了nodemon,但问题是相同的。

当我确实将nodemon更新到2.0.1版本时,它也发生在我身上。 你可能想回到你的旧。 只需运行这行代码npm i -g nodemon@your.old.version,例如npm i -g nodemon@1.19.4(这只是一个例子(

版本历史

2.0.1........................ 11 days ago
2.0.1-alpha.3........................ 12 days ago
2.0.1-alpha.2........................ 12 days ago
2.0.1-alpha.1........................ 12 days ago
2.0.0........................ 13 days ago
1.19.4........................ 2 months ago (this one is working fine for me)
1.19.3........................ 2 months ago
1.19.2........................ 3 months ago
1.19.1........................ 6 months ago
1.19.0........................ 7 months ago
1.18.11........................ 8 months ago

快乐的编码!!!!

最新更新