Skip to content

Commit

Permalink
display an error if loading a module fails in blitz console (#2792)
Browse files Browse the repository at this point in the history
(patch)
  • Loading branch information
g3offrey authored Oct 4, 2021
1 parent c0dc8f4 commit 62dc284
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/repl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
},
"dependencies": {
"@blitzjs/config": "0.40.0",
"@blitzjs/display": "0.40.0",
"chokidar": "3.5.1",
"globby": "11.0.2",
"pkg-dir": "^5.0.0",
Expand Down
2 changes: 2 additions & 0 deletions packages/repl/src/utils/load-blitz.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {getProjectRoot} from "@blitzjs/config"
import {log} from "@blitzjs/display"
import globby from "globby"
import path from "path"
import ProgressBar from "progress"
Expand Down Expand Up @@ -54,6 +55,7 @@ export const loadBlitz = async () => {
[name]: contextObj,
}
} catch (error) {
log.error(`Failed to load ${modulePath}: ${error}`)
debug("Failed to load module", error)
return {}
}
Expand Down

0 comments on commit 62dc284

Please sign in to comment.