Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the CLI behaviour outside a project #165

Open
alexxander opened this issue Jul 18, 2023 · 0 comments
Open

Fix the CLI behaviour outside a project #165

alexxander opened this issue Jul 18, 2023 · 0 comments

Comments

@alexxander
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant