Merge pull request #393 from strongloop/feature/improve-middleware-error-message

express-middleware: improve error message
This commit is contained in:
Miroslav Bajtoš 2014-07-22 15:43:30 +02:00
commit f5c4669f5c
1 changed files with 3 additions and 2 deletions

View File

@ -13,8 +13,9 @@ function safeRequire(m) {
function createMiddlewareNotInstalled(memberName, moduleName) {
return function () {
throw new Error('The middleware loopback.' + memberName + ' is not installed.\n' +
'Please run `npm install ' + moduleName + '` to fix the problem.');
var msg = 'The middleware loopback.' + memberName + ' is not installed.\n' +
'Run `npm install --save ' + moduleName + '` to fix the problem.';
throw new Error(msg);
};
}