From bf2555a2efdf6055309402b92288818fdbabea3e Mon Sep 17 00:00:00 2001 From: cel Date: Mon, 11 Mar 2019 15:34:55 -1000 Subject: script: catch resolve error --- lib/app.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/app.js b/lib/app.js index cdbc93c..f853d24 100644 --- a/lib/app.js +++ b/lib/app.js @@ -1407,7 +1407,9 @@ App.prototype.getScript = function (filepath, cb) { var self = this fs.stat(filename, function (err, stat) { if (err) return cb(err) - var resolved = require.resolve(filename) + var resolved + try { resolved = require.resolve(filename) } + catch(e) { return cb(e) } var prevMtime = self.mtimes[resolved] var mtime = stat.mtime.getTime() if (mtime !== prevMtime) { -- cgit v1.2.3