Skip to content

Commit

Permalink
Fix error handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
globegitter committed May 23, 2019
1 parent 4a895b4 commit 3a49ccb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/core/src/resolver.js
@@ -1,3 +1,4 @@
import Module from 'module'
import { resolve, join } from 'path'
import fs from 'fs-extra'
import consola from 'consola'
Expand Down Expand Up @@ -26,7 +27,7 @@ export default class Resolver {
paths: this.options.modulesDir
})
} catch (error) {
if (error.code === 'MODULE_NOT_FOUND') {
if (error.code === "MODULE_NOT_FOUND" || error.message.includes('Cannot resolve module')) {
return undefined
} else {
throw error
Expand Down

0 comments on commit 3a49ccb

Please sign in to comment.