Skip to content
New issue

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

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

Already on GitHub? # to your account

(fix): shortest fails when dotenv is not present #376

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

devin-ai-integration[bot]
Copy link
Contributor

Fixes #371 - Adds dotenv to the list of packages installed during initialization to prevent the ERR_MODULE_NOT_FOUND error when running the shortest CLI for the first time after initialization.

Link to Devin run: https://app.devin.ai/sessions/633319e29cf746c2a3f68c1e785f669d
Requested by: louismorgner

…OUND

Co-Authored-By: Razvan Marescu <razvan@marescu.net>
Copy link

vercel bot commented Mar 3, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
shortest ⬜️ Ignored (Inspect) Mar 3, 2025 5:33pm

Copy link
Contributor Author

🤖 Devin AI Engineer

Original prompt from Razvan:

SYSTEM:
The following is the thread conversation in Slack channel #shortest that you've been added to:

=== BEGIN THREAD HISTORY ===
U01URMDMFRP: 

[anti-work/shortest] Issue opened by louismorgner

U01UV2D06H5: @Devin could you investigate <https://github.com/anti-work/shortest/issues/371>


=== END THREAD HISTORY ===

The latest message is the one right above that tagged you.

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add "(aside)" to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@rmarescu rmarescu changed the title Fix dotenv not installed during initialization (fix): init fails when dotenv is not present on host machine Mar 3, 2025
@rmarescu rmarescu changed the title (fix): init fails when dotenv is not present on host machine (fix): shortest fails when dotenv is not present Mar 3, 2025
@@ -111,7 +111,7 @@ export const getInstallCmd = async () => {
const command = resolveCommand(
packageManager.agent,
packageManager.agent === "yarn" ? "add" : "install",
["@antiwork/shortest", "--save-dev"],
["@antiwork/shortest", "dotenv", "--save-dev"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dotenv is used internally by shortest. Why adding it here?

Copy link
Contributor Author

While dotenv is used internally by shortest, it's listed as a peerDependency in package.json, which means it's expected to be installed by the user rather than being bundled with the package. However, it wasn't being installed during initialization, causing the error reported in issue #371. Adding it to the installation list ensures that users can run the CLI without encountering the ERR_MODULE_NOT_FOUND error.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

dotenv not installed with init
1 participant