Also print CWD in node 'require' error reports

This commit is contained in:
SteveSandersonMS
2016-09-21 11:43:12 +01:00
parent 9aaa519044
commit b55e444a55
2 changed files with 12 additions and 2 deletions

View File

@@ -7,7 +7,12 @@ module.exports.renderToString = function (callback) {
// Developers sometimes have trouble with badly-configured Node installations, where it's unable // Developers sometimes have trouble with badly-configured Node installations, where it's unable
// to find node_modules. Or they accidentally fail to deploy node_modules, or even to run 'npm install'. // to find node_modules. Or they accidentally fail to deploy node_modules, or even to run 'npm install'.
// Make sure such errors are reported back to the .NET part of the app. // Make sure such errors are reported back to the .NET part of the app.
callback('Prerendering failed because of an error while loading \'aspnet-prerendering\'. Error was: ' + ex.stack); callback(
'Prerendering failed because of an error while loading \'aspnet-prerendering\'. Error was: '
+ ex.stack
+ '\nCurrent directory is: '
+ process.cwd()
);
return; return;
} }

View File

@@ -7,7 +7,12 @@ module.exports.createWebpackDevServer = function (callback) {
// Developers sometimes have trouble with badly-configured Node installations, where it's unable // Developers sometimes have trouble with badly-configured Node installations, where it's unable
// to find node_modules. Or they accidentally fail to deploy node_modules, or even to run 'npm install'. // to find node_modules. Or they accidentally fail to deploy node_modules, or even to run 'npm install'.
// Make sure such errors are reported back to the .NET part of the app. // Make sure such errors are reported back to the .NET part of the app.
callback('Webpack dev middleware failed because of an error while loading \'aspnet-webpack\'. Error was: ' + ex.stack); callback(
'Webpack dev middleware failed because of an error while loading \'aspnet-webpack\'. Error was: '
+ ex.stack
+ '\nCurrent directory is: '
+ process.cwd()
);
return; return;
} }