Bug description:
i am no longer able to start my replit. i got reports that my bot was offline, and when i check i got a message from replit to say that they have updated the server i was on, then the replit failed to even get past initialisation of the server with the following error.
unable to read .replit:
unable to decode .replit: toml: cannot load TOML value of type map[string]interface {} into a Go slice
nix error: building nix env: problem reading '.replit' file: unable to decode .replit: toml: cannot load TOML value of type map[string]interface {} into a Go slice
these files are not generated by me and are files by replit, i can see they created a backup of the old ones but the new one is broken to the max.
from what i can see it seems to be fixated on my old username before the change i did a while back i would think this would of changed everything else even on a new server, so now im stumped and my Discord Bot is now down and loosing users by the day.
Expected vs Current Behavior:
originally it would just be on always and be fine no issues even with replit shutting it down after so long and then letting it start back up was perfect for me, now nothing not even able to get to loading NPM.
Steps to reproduce:
i have tried to replicated on a new replit pulling in the same GIT repo of my bot but this fails to even collect and save the NPM packages so cannot load the bot for some reason else where
i have created a new replit, changed the names around
Bug appears at this link: https://replit.com/@diafolreaper/JarvisBot-old (this is a private replit and must stay that way)
Screenshot(s)/Screen Recording: none just one error above
Browser/OS/Device: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36
Replit Profile: https://replit.com/@diafolreaper
Can you share your .replit file please?
below is the .replit file
entrypoint = "index.js"
hidden = [".config"]
run = "while [ true ]; do node . ; done"
[interpreter]
command = "prybar-nodejs -q --ps1 \u0001\u001B[33m\u0002\u0001\u001B[00m\u0002 -i"
[interpreter.prompt]
[[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)"
[nix]
channel = "stable-21_11"
[env]
PATH = "/home/runner/$REPL_SLUG/.config/npm/node_global/bin:/home/runner/$REPL_SLUG/node_modules/.bin"
XDG_CONFIG_HOME = "/home/runner/.config"
npm_config_prefix = "/home/runner/$REPL_SLUG/.config/npm/node_global"
[gitHubImport]
requiredFiles = [".replit", "replit.nix", ".config"]
[packager]
language = "nodejs"
[packager.features]
packageSearch = true
guessImports = true
enabledForHosting = false
[unitTest]
language = "nodejs"
[languages.javascript]
pattern = "**/{*.js,*.jsx,*.ts,*.tsx}"
[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]
args = []
console = "externalTerminal"
cwd = "."
environment = []
pauseForSourceMap = false
program = "./index.js"
request = "launch"
sourceMaps = true
stopOnEntry = false
type = "pwa-node"
First of all, as far a I know run command does not really work with the interpreter setup, might want to remove that. I will continue looking
1 Like
this was added in the older version to force restart if anything forces the process to stop, i have removed.
Try copying and pasting this into your .replit file:
entrypoint = "index.js"
hidden = [".config", "package-lock.json"]
[interpreter]
command = [
"prybar-nodejs",
"-q",
"--ps1",
"\u0001\u001b[33m\u0002\u0001\u001b[00m\u0002 ",
"-i"
]
[[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)"
[nix]
channel = "stable-22_11"
[env]
XDG_CONFIG_HOME = "/home/runner/.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"]
[packager]
language = "nodejs"
[packager.features]
packageSearch = true
guessImports = true
enabledForHosting = false
[unitTest]
language = "nodejs"
[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]
args = []
console = "externalTerminal"
cwd = "."
environment = []
pauseForSourceMap = false
program = "./index.js"
request = "launch"
sourceMaps = true
stopOnEntry = false
type = "pwa-node"
[languages]
[languages.javascript]
pattern = "**/{*.js,*.jsx,*.ts,*.tsx}"
[languages.javascript.languageServer]
start = "typescript-language-server --stdio"
And see if it works.
ok i have done this now it just boot loops and still nothing
repl process died unexpectedly: exit status 2
nix error: building nix env: exit status 1
Output has been trimmed to the last 20 lines
evaluating file '/nix/store/l6smcclpy9f3v562q2ljb9zjdswg3ma1-nixpkgs-22.11-src/pkgs/top-level/stage.nix'
evaluating file '/nix/store/l6smcclpy9f3v562q2ljb9zjdswg3ma1-nixpkgs-22.11-src/pkgs/stdenv/adapters.nix'
evaluating file '/nix/store/l6smcclpy9f3v562q2ljb9zjdswg3ma1-nixpkgs-22.11-src/pkgs/build-support/trivial-builders.nix'
evaluating file '/nix/store/l6smcclpy9f3v562q2ljb9zjdswg3ma1-nixpkgs-22.11-src/pkgs/top-level/splice.nix'
evaluating file '/nix/store/l6smcclpy9f3v562q2ljb9zjdswg3ma1-nixpkgs-22.11-src/pkgs/top-level/all-packages.nix'
evaluating file '/nix/store/l6smcclpy9f3v562q2ljb9zjdswg3ma1-nixpkgs-22.11-src/pkgs/top-level/aliases.nix'
evaluating file '/nix/store/l6smcclpy9f3v562q2ljb9zjdswg3ma1-nixpkgs-22.11-src/pkgs/stdenv/generic/default.nix'
evaluating file '/nix/store/l6smcclpy9f3v562q2ljb9zjdswg3ma1-nixpkgs-22.11-src/lib/customisation.nix'
evaluating file '/nix/store/l6smcclpy9f3v562q2ljb9zjdswg3ma1-nixpkgs-22.11-src/pkgs/tools/text/gawk/default.nix'
evaluating file '/nix/store/l6smcclpy9f3v562q2ljb9zjdswg3ma1-nixpkgs-22.11-src/pkgs/servers/x11/xorg/default.nix'
evaluating file '/nix/store/l6smcclpy9f3v562q2ljb9zjdswg3ma1-nixpkgs-22.11-src/pkgs/servers/x11/xorg/overrides.nix'
evaluating file '/nix/store/l6smcclpy9f3v562q2ljb9zjdswg3ma1-nixpkgs-22.11-src/pkgs/stdenv/generic/make-derivation.nix'
evaluating file '/nix/store/l6smcclpy9f3v562q2ljb9zjdswg3ma1-nixpkgs-22.11-src/pkgs/build-support/mkshell/default.nix'
evaluating file '/home/runner/JarvisBot-old/replit.nix'
evaluating file '/nix/store/l6smcclpy9f3v562q2ljb9zjdswg3ma1-nixpkgs-22.11-src/pkgs/stdenv/generic/check-meta.nix'
evaluating file '/nix/store/l6smcclpy9f3v562q2ljb9zjdswg3ma1-nixpkgs-22.11-src/lib/systems/doubles.nix'
copied source '/nix/store/l6smcclpy9f3v562q2ljb9zjdswg3ma1-nixpkgs-22.11-src/pkgs/stdenv/generic/default-builder.sh' -> '/nix/store/9krlzvny65gdc8s7kpb6lkx8cd02c25b-default-builder.sh'
error: nodejs-12_x has been removed. Use a newer version instead.
(use '--show-trace' to show detailed location information)
panic: exec: "node": executable file not found in $PATH
goroutine 1 [running]:
main.Execute(0xc000132000)
github.com/replit/prybar/languages/nodejs/main.go:40 +0x1ca
main.main()
github.com/replit/prybar/languages/nodejs/generated_launch.go:7 +0x1e
I had a feeling this would happen, fix it by replacing your replit.nix with this:
{ pkgs }: {
deps = [
pkgs.nodejs-18_x
pkgs.nodePackages.typescript-language-server
pkgs.yarn
pkgs.replitPackages.jest
];
}
1 Like
omg thank you, i had some node package issues but a play around with the packages causing issues fixed my problem and my bot is now back up and running, thank you so much.
2 Likes
system
Closed
March 12, 2023, 4:21am
11
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.