R
Railway•3y ago
axindev

SyntaxError

I get this error when I run my program. Code is below.
export function Welcomer(member) {
const welcomer = await import('./oceane/welcomer.js')
welcomerFile.execute(member)
}
export function Welcomer(member) {
const welcomer = await import('./oceane/welcomer.js')
welcomerFile.execute(member)
}
11 Replies
axindev
axindevOP•3y ago
Other info: - Node 16.x - Using Nixpacks The unexpected reserved word is const
Unknown User
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
axindev
axindevOP•3y ago
Tried that too. Same error.
Unknown User
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
axindev
axindevOP•3y ago
Wait does Railway use ESLint? I would typically want that kind of thing to run by my choice, not Railway's.
Unknown User
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
axindev
axindevOP•3y ago
Huh Am I expected to identify everything using var!?
Unknown User
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
axindev
axindevOP•3y ago
It's not actually used as an identifier though And I've only just started having problems with that today Same code has been running fine on everything else
Unknown User
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
axindev
axindevOP•3y ago
> start
> node src/index.js
file:///workspace/src/handler.js:26
const welcomer = await import('./oceane/welcomer.js')
^^^^^
SyntaxError: Unexpected reserved word
at ESMLoader.moduleStrategy (node:internal/modules/esm/translators:117:18)
at ESMLoader.moduleProvider (node:internal/modules/esm/loader:337:14)
> start
> node src/index.js
file:///workspace/src/handler.js:26
const welcomer = await import('./oceane/welcomer.js')
^^^^^
SyntaxError: Unexpected reserved word
at ESMLoader.moduleStrategy (node:internal/modules/esm/translators:117:18)
at ESMLoader.moduleProvider (node:internal/modules/esm/loader:337:14)
Any update??? Nevermind, this error has seemingly fixed itself. Archiving Oh wait I can't 💀
Want results from more Discord servers?
Add your server