-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Labels
process: buildRelated to our internal build processRelated to our internal build processstage: ready for workThe issue is reproducible and in scopeThe issue is reproducible and in scope
Description
Current behavior:
During prod builds, yarn
is run in each subpackage individually:
cypress/scripts/binary/util/packages.js
Lines 180 to 199 in ffa8c9e
const retryNpmInstall = function (pkg) { | |
console.log('installing %s', pkg) | |
console.log('NODE_ENV is %s', process.env.NODE_ENV) | |
// force installing only PRODUCTION dependencies | |
// https://docs.npmjs.com/cli/install | |
const npmInstall = _.partial(yarn, ['install', '--production']) | |
return npmInstall(pkg, { NODE_ENV: 'production' }) | |
.catch({ code: 'EMFILE' }, () => { | |
return Promise | |
.delay(1000) | |
.then(() => { | |
return retryNpmInstall(pkg) | |
}) | |
}).catch((err) => { | |
console.log(err, err.code) | |
throw err | |
}) | |
} |
Desired behavior:
Run yarn
in the root to take advantage of dependency hoisting. This will help reduce the overall binary size
This will require some reworking of the existing build process. Only production dependencies should be installed in the final .zip, but some dev dependencies are needed for the build process.
Related: #5977
jennifer-shehane
Metadata
Metadata
Assignees
Labels
process: buildRelated to our internal build processRelated to our internal build processstage: ready for workThe issue is reproducible and in scopeThe issue is reproducible and in scope