Closed gitauto-ai[bot] closed 1 month ago
[!IMPORTANT]
Review skipped
Bot user detected.
To trigger a single review, invoke the
@coderabbitai review
command.You can disable this status message by setting the
reviews.review_status
tofalse
in the CodeRabbit configuration file.
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 89.55%. Comparing base (
df85b84
) to head (be8a5f6
). Report is 1 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Resolves #111
Why the bug occurs
The bug occurs because the
ora
module is listed underdevDependencies
in thepackage.json
file. This means it is only installed in development environments and not in production or when the package is installed globally. However, theora
module is required at runtime, leading to a "Cannot find module 'ora'" error when the package is used.How to reproduce
fanyi
package globally using npm or yarn.ora
module, such asfy love
.ora
module cannot be found.How to fix
To fix this issue, move the
ora
module fromdevDependencies
todependencies
in thepackage.json
file. This ensures thatora
is installed in all environments, including production and when the package is installed globally. After making this change, runnpm install
oryarn install
to update the dependencies.Test these changes locally