SyntaxError: Unexpected token '?'
Lemorz56 opened this issue · 1 comments
Hi! Im fairly new to typescript itself so forgive me if the issue is easy to solve.
I've followed the instructions and I've installed everything correctly, but once i run
npm run start:dev
i get this error
`> my-bot@1.0.0 start:dev /Discord-Bot-TypeScript-Template
ts-node-dev --watch src//*.ts,config//.json,lang/**/.json src/start.ts
[INFO] 00:48:23 ts-node-dev ver. 1.1.6 (using ts-node ver. 9.1.1, typescript ver. 4.2.4)
/Discord-Bot-TypeScript-Template/src/services/lang.ts:12
return (this.multilingualService.getEmbed(embedName, langCode, variables) ??
^
SyntaxError: Unexpected token '?'
at wrapSafe (internal/modules/cjs/loader.js:1053:16)
at Module._compile (internal/modules/cjs/loader.js:1101:27)
at Module._compile (Discord-Bot-TypeScript-Template/node_modules/source-map-support/source-map-support.js:547:25)
at Module.m._compile (/tmp/ts-node-dev-hook-6096756080016301.js:69:33)
at Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at require.extensions. (/tmp/ts-node-dev-hook-6096756080016301.js:71:20)
at Object.nodeDevHook [as .ts] (Discord-Bot-TypeScript-Template/node_modules/ts-node-dev/lib/hook.js:63:13)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Module.require (internal/modules/cjs/loader.js:1025:19)
[ERROR] 00:48:28 SyntaxError: Unexpected token '?' `
I've looked around at the code but i feel like this isnt something i can solve or figure out. Sorry for bugging you :)
Seeking help in the Discord channel instead.