Skip to content

Foundations Replit: Exercises don't run #29552

Closed
@MaoShizhong

Description

@MaoShizhong

Checks

Describe your suggestion

Bumping TheOdinProject/javascript-exercises#509 and #29180 which will move us away from the Replit platform to our in-house exercises and solve all of these issues once and for all.


This affects exercises 1, 3, and 4 (the Node-based repls, not exercise 2 which is webview based and still works fine).

It seems more stuff has changed behind the scenes at Replit. Several reports have come in the server about the Foundations Replit exercises not outputting anything when run - I can confirm this behaviour in both Chrome and Firefox. Nothing gets output at all when "Run" is pressed.

Playing around and checking docs, it seems the hidden .replit config expects run commands that the current .replit configs don't contain (checked by creating a fresh Node.js repl and seeing that config).

Fix

  1. For exercises 1, 3 and 4, show hidden files and replace the entirety of .replit's contents with the current default config:
    entrypoint = "index.js"
    modules = ["nodejs-22"]
    hidden = [".config", "package-lock.json"]
    
    [gitHubImport]
    requiredFiles = [".replit", "replit.nix", "package.json", "package-lock.json"]
    
    [nix]
    channel = "stable-24_11"
    
    [deployment]
    run = ["node", "index.js"]
    deploymentTarget = "autoscale"
    ignorePorts = false
  2. Delete the replit.nix file, as the current default Node repl setup does not include one, and its inclusion seems to cause an error on build.

Once both steps are done, the bugged exercises now run.

Path

Foundations

Lesson Url

https://www.theodinproject.com/lessons/foundations-data-types-and-conditionals#assignment

(Optional) Discord Name

No response

(Optional) Additional Comments

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions