mirror of
https://github.com/strapi/strapi.git
synced 2025-08-14 19:56:41 +00:00
Add error events during project generation
This commit is contained in:
parent
3c0d330e22
commit
4812f34bd5
@ -83,6 +83,7 @@ module.exports = (scope, cb) => {
|
||||
'cache-min': 999999999
|
||||
}, err => {
|
||||
if (err) {
|
||||
trackSuccess('didNotInstallProjectDependencies', scope);
|
||||
console.log();
|
||||
console.log('⚠️ You should run `npm install` into your application before starting it.');
|
||||
console.log();
|
||||
@ -106,8 +107,10 @@ module.exports = (scope, cb) => {
|
||||
const data = shell.exec(`yarn --cwd ${scope.rootPath} add ${alphaDependencies} --production`, { silent: true });
|
||||
|
||||
if (data.stderr && data.code !== 0) {
|
||||
trackSuccess('didNotInstallProjectDependencies', scope);
|
||||
cb();
|
||||
}
|
||||
|
||||
pluginsInstallation();
|
||||
}
|
||||
} else {
|
||||
@ -150,6 +153,7 @@ module.exports = (scope, cb) => {
|
||||
loader = ora(`Install plugin ${cyan(defaultPlugin.name)}.`).start();
|
||||
exec(`node ${strapiBin} install ${defaultPlugin.name} ${scope.developerMode && defaultPlugin.core ? '--dev' : ''}`, (err) => {
|
||||
if (err) {
|
||||
trackSuccess('didNotInstallProjectPlugins', scope);
|
||||
loader.warn(`An error occurred during ${defaultPlugin.name} plugin installation.`);
|
||||
console.log(err);
|
||||
return resolve();
|
||||
|
@ -5,6 +5,7 @@
|
||||
*/
|
||||
|
||||
// Node.js core.
|
||||
const os = require('os');
|
||||
const request = require('request');
|
||||
const { machineIdSync } = require('node-machine-id');
|
||||
|
||||
@ -16,7 +17,8 @@ module.exports = function trackSuccess(event, scope, error) {
|
||||
uuid: scope.uuid,
|
||||
deviceId: machineIdSync(),
|
||||
properties: {
|
||||
error
|
||||
error,
|
||||
os: os.type()
|
||||
}
|
||||
})
|
||||
.on('error', () => {});
|
||||
|
Loading…
x
Reference in New Issue
Block a user