mailingui
mailingui copied to clipboard
Fix the CLI behaviour outside a project
If the init
command is called outside a project the CLI throws the following unfriendly error:
node:fs:590
handleErrorFromBinding(ctx);
^
Error: ENOENT: no such file or directory, open 'package.json'
at Object.openSync (node:fs:590:3)
at Object.readFileSync (node:fs:458:35)
[...]
{
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: 'package.json'
}
Let's add a nicer error message.