Although this is not a big problem, it is still very annoying. When the first operation is wrong, it will generate error log files under the current project, but when the second operation is successful, the yarn-error.log will not disappear.
In the old version of NPM, I remember that when the first execution command failed, a npm-error.log file was generated under the current item, but second times, if the execution is successful, the npm-error.log file will be deleted automatically.
The new version of NPM, npm-error.log directly into the global directory (~/.npm/xxxxlog/npm-error.log) does not appear in the current project, because of failure, most likely at the time of the terminal display and the performer will know why, do not open the log file to further query causes
I can see why the current behavior would be annoying.
Deleting yarn-error.log after a successful operation seems like a bad idea. A user still might be interested in investigating the cause of the failed operation.
Saving the yarn-error.log file outside of the project directory might be a good idea. It would make the project directory less cluttered. It would make the file harder to find, but adjusting the error message to print the file location should help with that.
a global config option might be useful. for me, as a yarn user, I never find the log files helpful because the stdout error message is enough for me to fix the command mistype or other problem
A global config option to turn off entirely would be great, would agree that the log files usually aren't helpful
Most helpful comment
I can see why the current behavior would be annoying.
Deleting
yarn-error.logafter a successful operation seems like a bad idea. A user still might be interested in investigating the cause of the failed operation.Saving the
yarn-error.logfile outside of the project directory might be a good idea. It would make the project directory less cluttered. It would make the file harder to find, but adjusting the error message to print the file location should help with that.