mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +01:00
shorter error message
This commit is contained in:
@@ -44,7 +44,7 @@ module.require = function () {
|
|||||||
// if we can't find the module try in parent directory
|
// if we can't find the module try in parent directory
|
||||||
// since plugins.js moved into plugins folder
|
// since plugins.js moved into plugins folder
|
||||||
if (err.code === 'MODULE_NOT_FOUND') {
|
if (err.code === 'MODULE_NOT_FOUND') {
|
||||||
winston.warn('[plugins/require] please update module.parent.require("' + arguments[0] + '") in your plugin!\n' + err.stack.split('\n').slice(0, 6).join('\n'));
|
winston.warn('[plugins/require] please update module.parent.require("' + arguments[0] + '") in your plugin!\n' + err.stack.split('\n')[5]);
|
||||||
return defaultRequire.apply(module, [path.join('../', arguments[0])]);
|
return defaultRequire.apply(module, [path.join('../', arguments[0])]);
|
||||||
}
|
}
|
||||||
throw err;
|
throw err;
|
||||||
|
|||||||
Reference in New Issue
Block a user