mirror of
https://github.com/strapi/strapi.git
synced 2025-10-30 01:17:28 +00:00
Console log error before capture in sentry to get the detailed logs
This commit is contained in:
parent
ab365482c4
commit
b43fba4a79
@ -93,8 +93,6 @@ module.exports = async function createProject(
|
||||
loader.stop();
|
||||
console.log(`Dependencies installed ${chalk.green('successfully')}.`);
|
||||
} catch (error) {
|
||||
error.message = error.stderr;
|
||||
|
||||
loader.stop();
|
||||
await trackUsage({
|
||||
event: 'didNotInstallProjectDependencies',
|
||||
@ -102,13 +100,17 @@ module.exports = async function createProject(
|
||||
error: error.stderr.slice(-1024),
|
||||
});
|
||||
|
||||
console.error(`${chalk.red('Error')} while installing dependencies:`);
|
||||
error.stderr
|
||||
.trim()
|
||||
.split('\n')
|
||||
.forEach(line => {
|
||||
console.error(line);
|
||||
});
|
||||
|
||||
await captureError(error);
|
||||
|
||||
stopProcess(
|
||||
`${chalk.red(
|
||||
'Error'
|
||||
)} while installing dependencies:\n${error.stderr.trim()}`
|
||||
);
|
||||
stopProcess('Stopping installation');
|
||||
}
|
||||
|
||||
await trackUsage({ event: 'didCreateProject', scope });
|
||||
|
||||
@ -30,6 +30,17 @@ module.exports = async function createQuickStartProject(scope) {
|
||||
env: {
|
||||
FORCE_COLOR: 1,
|
||||
},
|
||||
}).catch(error => captureError(error));
|
||||
}).catch(error => {
|
||||
if (error && error.stderr) {
|
||||
(error.stderr || '')
|
||||
.trim()
|
||||
.split('\n')
|
||||
.forEach(line => {
|
||||
console.error(line);
|
||||
});
|
||||
}
|
||||
|
||||
return captureError(error);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user