diff --git a/src/utils/imports.ts b/src/utils/imports.ts index 6856a35923..5584affdc3 100644 --- a/src/utils/imports.ts +++ b/src/utils/imports.ts @@ -51,7 +51,7 @@ function tryRequire(packageName: string): T | void { try { mod = require(packageName); } catch (err) { - if (err.code !== 'ENOENT') throw err; // tslint:disable-line + if (err.code !== 'MODULE_NOT_FOUND') throw err; // tslint:disable-line } return mod; }