const nodeVersions = process.version.split('.')
const nodeMajorVersion = parseInt(nodeVersions[0].slice(1))
const nodeMinorVersion = parseInt(nodeVersions[1])
if (nodeMajorVersion < 10) {
// exit with error
Yarn doesn't need this because Yarn reads the package.json and error if the Node version required doesn't match, while npm is supposed to print a warning only.
Discussed from #3930
https://prisma-company.slack.com/archives/CEYCG2MCN/p1602759196130900
In the CLI in the preinstall hook we could use something like
Yarn doesn't need this because Yarn reads the package.json and error if the Node version required doesn't match, while npm is supposed to print a warning only.