Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions lib/services/plugins-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,17 @@ This framework comes from ${dependencyName} plugin, which is installed multiple
): INodeModuleData {
// module can be modulePath or moduleName
if (!this.$fs.exists(module) || path.basename(module) !== "package.json") {
module = this.getPackageJsonFilePathForModule(module, projectDir);
const resolvedPath = this.getPackageJsonFilePathForModule(
module,
projectDir,
);
if (!resolvedPath) {
this.$logger.warn(
`Could not find module ${color.yellow(module)}. It may have been removed or is not installed. Skipping.`,
);
return null;
}
module = resolvedPath;
}

const data = this.$fs.readJson(module);
Expand Down Expand Up @@ -759,7 +769,7 @@ This framework comes from ${dependencyName} plugin, which is installed multiple
const nodeModules = this.getDependencies(projectData.projectDir);
return _.map(nodeModules, (nodeModuleName) =>
this.getNodeModuleData(nodeModuleName, projectData.projectDir),
);
).filter(Boolean);
}

private async executeNpmCommand(
Expand Down