mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
improve JsImage.load Npm.require errors
- Use buildmessage (skips stack trace) - Drop extraneous trailing single quote - Say "from" instead of "while loading" since this can also happen when running code from the file after load time
This commit is contained in:
@@ -1329,9 +1329,10 @@ _.extend(JsImage.prototype, {
|
||||
try {
|
||||
return require(name);
|
||||
} catch (e) {
|
||||
throw new Error("Can't load npm module '" + name +
|
||||
"' while loading " + item.targetPath +
|
||||
". Check your Npm.depends().'");
|
||||
buildmessage.error(
|
||||
"Can't load npm module '" + name + "' from " +
|
||||
item.targetPath + ". Check your Npm.depends().");
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user