From 9227630ee1161189cfc8aa672bf398c7ea25a565 Mon Sep 17 00:00:00 2001 From: Simon Lu Date: Thu, 14 Jan 2021 11:32:10 +0800 Subject: [PATCH] make 'debug' as dependencies nodejs under v15.5.1 has a bug: it will cache MODULE_NOT_FOUND when require a non-exits file([issue](https://github.com/nodejs/node/issues/26926)). ./debug.js try to require('debug'), if the 'debug' pkg not exits, nodejs will cache the result. Even install debug later in the same process(spawn npm install), require('debug') will still throw error so, we should make 'debug' pacakge as dependencies. --- package.json | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 542d9de..d070257 100644 --- a/package.json +++ b/package.json @@ -43,10 +43,8 @@ "url": "https://github.com/sponsors/RubenVerborgh" } ], - "peerDependenciesMeta": { - "debug": { - "optional": true - } + "dependencies": { + "debug": "^4.3.1" }, "devDependencies": { "concat-stream": "^2.0.0",