mirror of
https://github.com/strapi/strapi.git
synced 2025-12-27 15:13:21 +00:00
Improve the error message on install dependencies error in create strapi-app
This commit is contained in:
parent
82b36df90c
commit
d73e842d2f
@ -105,7 +105,26 @@ module.exports = async function createProject(
|
||||
|
||||
await captureStderr('didNotInstallProjectDependencies', error);
|
||||
|
||||
stopProcess('Stopping installation');
|
||||
console.log(chalk.black.bgWhite(' Keep trying! '));
|
||||
console.log();
|
||||
console.log(
|
||||
chalk.bold(
|
||||
'Oh, it seems that you encountered errors while installing dependencies in your project.'
|
||||
)
|
||||
);
|
||||
console.log(`Don't give up, your project was created correctly.`);
|
||||
console.log(
|
||||
`Fix the issues mentionned in the installation errors and try to run the following command:`
|
||||
);
|
||||
console.log();
|
||||
console.log(
|
||||
`cd ${chalk.green(rootPath)} && ${chalk.cyan(
|
||||
scope.useYarn ? 'yarn' : 'npm'
|
||||
)} install`
|
||||
);
|
||||
console.log();
|
||||
|
||||
stopProcess();
|
||||
}
|
||||
|
||||
await trackUsage({ event: 'didCreateProject', scope });
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = function stopProcess(message) {
|
||||
console.error(message);
|
||||
if (message) console.error(message);
|
||||
process.exit(1);
|
||||
};
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@sentry/node": "^5.7.1",
|
||||
"chalk": "^2.4.2",
|
||||
"execa": "^1.0.0",
|
||||
"fs-extra": "^8.0.1",
|
||||
"inquirer": "^6.3.1",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user