Skip to content

[BUG]: npm run setup does not create .env file, stops after opening localhost port #233

Open

Description

@sirconfy

Has this bug been raised before?

  • I have checked "open" AND "closed" issues and this is not a duplicate

Description

When running npm run setup, the script doesn’t generate the .env file as expected. Instead, it stops after opening a localhost port (e.g., http://localhost:54043).

Steps to Reproduce

  1. Clone the repo:
    git clone https://github.com/jargonsdev/jargons.dev.git cd jargons.dev npm ci
  2. Run setup:
    npm run setup
  3. Observe that the script outputs:
    `> jargons.dev@1.0.0 setup

node dev/setup.js

Open http://localhost:54043
4. No .env` file is generated.

Expected Behavior

The .env file should be created automatically after running npm run setup, as described in the documentation.

Actual Behavior

The setup script hangs and only opens a localhost port. No .env file is created.

Environment

  1. OS: macOS (e.g., macOS 14.x Sonoma)
  2. Machine: MacBook Pro
  3. Node.js: v22.14.0
  4. npm: 10.9.2

Screenshots

npm run setup
Image

npm start

Image

Output

Image

Do you want to work on this issue?

No

If "yes" to above, please explain how you would technically implement this

No response

Activity

  1. babblebey commented on Oct 4, 2025

    @babblebey
    Member

    Did you follow this exact steps as seen in the screencast??

    screen-capture.15.webm

    The Steps

    • Run npm run setup
    • Open the page created for you in the script result in the browser (in my case it was http://localhost:62470 - you have to be logged in to github)
    • That should redirect you to a page to create a Github App using a set manifest
    • append your name to the preset App name and create the App
    • That is when your env gets set with the details retrieved from the App creation session.
    • You can then follow the next step.
  2. sirconfy commented on Oct 5, 2025

    @sirconfy
    ContributorAuthor
  3. babblebey commented on Oct 6, 2025

    @babblebey
    Member

    Still need some more context, I am currently working on #234 with the intention of making the steps even clearer and more user friendly too... This bothers me though.

    Could you kindly record your screen as your run the script again... or if you could provide more context by answering the questions...

    • Were you able to create a GitHub App, when you were redirected to the github page
    • After creation, were you redirected back to the page with next steps??
    • What was the returned response in your terminal when you returned from the github app creation.... expected returned is an app object that should show metadata of the app (icluding some sensitive info too though)

    🤔

  4. Nabilhassan12345 commented on Oct 18, 2025

    @Nabilhassan12345

    Hi — I’m Nabil (first-time contributor for hacktoberfest). I’d like to work on this issue and will open a small PR that:
    adds safer logging to the setup flow,
    writes .env when GitHub App data is received, and
    writes a .env.example fallback if values are incomplete.
    I’ll attach a short screencast of the local setup flow when I test. Please let me know if you prefer a docs-only change instead.

  5. added 2 commits that reference this issue on Oct 18, 2025
    2d3a73a
    d096ba8
  6. babblebey commented on Oct 18, 2025

    @babblebey
    Member

    Hi @Nabilhassan12345, its good to have you here 😁

    The understanding is that this doesn't work as it should on macOS, @sirconfy here confirm he was able to gotten thisto work after moving to windows - #62 (comment); I can confirm it works on my windows machine and some other contributors' too.

    Here's what would be valuable contribution to start with....

    • See if you can reproduce this error on a macOS by running the npm run setup on a macOS - this kinda depends on whether you're running on macOS
    • Try running this script on windows (if you're on windows) to confirm it works as intended

    If we figure this really is an issue related to macOS, then we have to fix... but we can only do that after we finish up on the following pull requests that touches on that part of the system...

    Feel free to report your findings here on this issue 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🔍 triageThis is under investigation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions