2018-11-08 19:23:39 +05:30
|
|
|
const chalk = require('chalk');
|
|
|
|
|
|
|
|
// check that fsevents is available if we're on macOS
|
|
|
|
if (process.platform === 'darwin') {
|
|
|
|
try {
|
|
|
|
require.resolve('fsevents');
|
|
|
|
} catch (e) {
|
|
|
|
console.error(`${chalk.red('error')} Dependency postinstall check failed.`);
|
|
|
|
console.error(
|
|
|
|
chalk.red(`
|
|
|
|
The fsevents driver is not installed properly.
|
|
|
|
If you are running a new version of Node, please
|
|
|
|
ensure that it is supported by the fsevents library.
|
|
|
|
|
|
|
|
You can try installing again with \`${chalk.cyan('yarn install --force')}\`
|
2019-07-07 11:18:12 +05:30
|
|
|
`),
|
2018-11-08 19:23:39 +05:30
|
|
|
);
|
|
|
|
process.exit(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
console.log(`${chalk.green('success')} Dependency postinstall check passed.`);
|