-
-
Notifications
You must be signed in to change notification settings - Fork 137
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
GitAuto: Error: Cannot find module 'ora' #113
GitAuto: Error: Cannot find module 'ora' #113
Conversation
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #113 +/- ##
=======================================
Coverage 89.55% 89.55%
=======================================
Files 5 5
Lines 498 498
=======================================
Hits 446 446
Misses 52 52 ☔ View full report in Codecov by Sentry. |
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