Skip to content

Commit

Permalink
fix: check dependencyGraph root for version info
Browse files Browse the repository at this point in the history
  • Loading branch information
BasKiers committed May 22, 2019
1 parent f6fba80 commit 8c61219
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/packExternalModules.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ function getProdModules(externalModules, packagePath, dependencyGraph, forceExcl
// Add transient dependencies if they appear not in the service's dev dependencies
const originInfo = _.get(dependencyGraph, 'dependencies', {})[module.origin] || {};
moduleVersion = _.get(_.get(originInfo, 'dependencies', {})[module.external], 'version');
if (!moduleVersion) {
moduleVersion = _.get(dependencyGraph, `dependencies.${module.external}.version`);
}
if (!moduleVersion) {
this.serverless.cli.log(`WARNING: Could not determine version of module ${module.external}`);
}
Expand Down

0 comments on commit 8c61219

Please sign in to comment.