We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7bae48 commit 40dd344Copy full SHA for 40dd344
packages/dep-tree-js/index.js
@@ -61,7 +61,13 @@ function getPackages(file) {
61
var deps = [];
62
const extension = path.extname(file);
63
if (availableExtensions.includes(extension)) {
64
- var imports = konan(file, fs.readFileSync(file, "utf8"));
+ var imports;
65
+ try {
66
+ // will throw if compiler deps (typescript, mdx, vue) are not installed yet
67
+ imports = konan(file, fs.readFileSync(file, "utf8"));
68
+ } catch (e) {
69
+ return [];
70
+ }
71
// only strings for now.
72
imports.strings.forEach(imp => {
73
imp = trimPackageName(imp);
0 commit comments