Skip to content

Commit

Permalink
Improve error message for missing npm dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
aychtang committed May 12, 2021
1 parent b174cd6 commit c8e47ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion __tests__/get-dependency-list.js
Expand Up @@ -108,7 +108,7 @@ test('throws on missing peerDependencies', (t) => {

const error = t.throws(() => getDependencyList(fileName, serverless));

t.is(error.message, '[serverless-plugin-include-dependencies]: Could not find wont-find-me');
t.is(error.message, '[serverless-plugin-include-dependencies]: Could not find npm package: wont-find-me');
});

test('understands local named dependencies', (t) => {
Expand Down
2 changes: 1 addition & 1 deletion get-dependency-list.js
Expand Up @@ -59,7 +59,7 @@ module.exports = function(filename, serverless, cache) {

return;
} catch(e) {
throw new Error(`[serverless-plugin-include-dependencies]: Could not find ${moduleName}`);
throw new Error(`[serverless-plugin-include-dependencies]: Could not find npm package: ${moduleName}`);
}
}
throw e;
Expand Down

0 comments on commit c8e47ff

Please sign in to comment.