Shows help message for broken require in scheduler adapter (#7706)
closes #7584 - added help message to assist in debugging broken require
This commit is contained in:
parent
8d29095fa8
commit
47933c9949
@ -38,7 +38,7 @@ exports.createAdapter = function (options) {
|
||||
}
|
||||
// CASE: if module not found it can be an error within the adapter (cannot find bluebird for example)
|
||||
else if (err.code === 'MODULE_NOT_FOUND' && err.message.indexOf(contentPath + activeAdapter) === -1) {
|
||||
return Promise.reject(new errors.IncorrectUsageError({err: err}));
|
||||
return Promise.reject(new errors.IncorrectUsageError({err: err, help: 'Please check the imports are valid in ' + contentPath + activeAdapter}));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user