i18next / i18next-parser

Parse your code to extract translation keys/values and manage your catalog files
MIT License
472 stars 195 forks source link

Script globally catches error and outputs a generic disclaimer rather than printing a useful error #1039

Open Jme797 opened 1 month ago

Jme797 commented 1 month ago

🐛 Bug Report

In cli.js there is a snippet of code like

image

Globally catching all errors and outputting a string of text like Config file does not exist...

Using console.log to output this debug information prevents the script from exiting with a failing exit code instead it exits status 0, also it doesn't give useful information as to why the module was not found,

I think not catching the errors here would likely be a more useful output than a catch all that gives a very vague generic error message.

To Reproduce

A minimal reproducible example. A codesandbox example or similar or at least steps to reproduce the behavior:

// Paste your code here

Expected behavior

A clear and concise description of what you expected to happen.

// Paste the expected results here

Your Environment