aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/app.js4
1 files changed, 3 insertions, 1 deletions
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) {