Repl in question: https://replit.com/@jkkgvnrb5t/ButterDog-Chat-release
My repl is a chat service based off of node.js, and using socket.io.
I’ve tried many things to get it to work, such as including “#!/bin/bash” on the top line of a main.sh file (which I am using to execute “npm run dev”).
I’ve asked ChatGPT already. Which didn’t help much but at least it tried.
Currently, my .replit file looks like this:
language = "nodejs"
run = "bash main.sh"
entrypoint = "main.sh"
hidden = [".config", "package-lock.json"]
[languages]
[languages.javascript]
pattern = "**/{*.js,*.jsx,*.ts,*.tsx,*.json}"
[languages.javascript.languageServer]
start = "typescript-language-server --stdio"
[debugger]
support = true
[debugger.interactive]
transport = "localhost:0"
startCommand = ["dap-node"]
[debugger.interactive.initializeMessage]
command = "initialize"
type = "request"
[debugger.interactive.initializeMessage.arguments]
clientID = "replit"
clientName = "replit.com"
columnsStartAt1 = true
linesStartAt1 = true
locale = "en-us"
pathFormat = "path"
supportsInvalidatedEvent = true
supportsProgressReporting = true
supportsRunInTerminalRequest = true
supportsVariablePaging = true
supportsVariableType = true
[debugger.interactive.launchMessage]
command = "launch"
type = "request"
[debugger.interactive.launchMessage.arguments]
console = "externalTerminal"
cwd = "."
pauseForSourceMap = false
program = "./index.js"
request = "launch"
sourceMaps = true
stopOnEntry = false
type = "pwa-node"
[packager]
language = "nodejs"
[packager.features]
packageSearch = true
guessImports = true
enabledForHosting = false
[interpreter]
command = ["prybar-nodejs", "-q", "--ps1", "\u0001\u001B[33m\u0002\u0001\u001B[00m\u0002 ", "-i"]
[unitTest]
language = "nodejs"
[nix]
channel = "stable-22_11"
[env]
XDG_CONFIG_HOME = "/home/runner/$REPL_SLUG/.config"
PATH = "/home/runner/$REPL_SLUG/.config/npm/node_global/bin:/home/runner/$REPL_SLUG/node_modules/.bin"
npm_config_prefix = "/home/runner/$REPL_SLUG/.config/npm/node_global"
[gitHubImport]
requiredFiles = [".replit", "replit.nix", ".config", "package.json", "package-lock.json"]
[[hints]]
regex = 'Error \[ERR_REQUIRE_ESM\]'
message = "We see that you are using require(...) inside your code. We currently do not support this syntax. Please use 'import' instead when using external modules. (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import)"
#[deployment]
#run = ["sh", "-c", "bash main.sh"]