mailingui icon indicating copy to clipboard operation
mailingui copied to clipboard

Fix the CLI behaviour outside a project

Open alexxander opened this issue 1 year ago • 0 comments

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.

alexxander avatar Jul 18 '23 14:07 alexxander