Skip to content

Commit ab5cfad

Browse files
committed
micro: improve module require error
1 parent a98d09c commit ab5cfad

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

bin/micro

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,7 @@ try {
6262
mod = mod.default;
6363
}
6464
} catch (err) {
65-
if ('MODULE_NOT_FOUND' === err.code) {
66-
console.error(`micro: Failed to \`require\` "${file}".`)
67-
} else {
68-
console.error(`micro: Error when importing ${file}: ${err.stack}`)
69-
}
70-
65+
console.error(`micro: Error when importing ${file}: ${err.stack}`)
7166
process.exit(1)
7267
}
7368

0 commit comments

Comments
 (0)