You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ts-node
E:XXXXX\nodejs\node_modules\typescript\lib\typescript.js:139
for (let i = startIndex ?? 0; i < array.length; i++) {
^
SyntaxError: Unexpected token ?
at new Script (vm.js:79:7)
at createScript (vm.js:251:10)
at Object.runInThisContext (vm.js:303:10)
at Module._compile (internal/modules/cjs/loader.js:656:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
at Module.require (internal/modules/cjs/loader.js:636:17)
at require (internal/modules/cjs/helpers.js:20:18)
Expected Behavior
Actual Behavior
Steps to reproduce the problem
Minimal reproduction
Specifications
ts-node version: v10.9.1
node version: v10.12.0
TypeScript version:5.2.2
tsconfig.json, if you're using one:{
"extends": "@tsconfig/node10/tsconfig.json"
}
{}
package.json:
{}
Operating system and version: win 10
If Windows, are you using WSL or WSL2?:
The text was updated successfully, but these errors were encountered:
I was getting that error when I ran ts-node, but I upgraded my nodejs (via https://github.com/nodesource/distributions ) and the problem seems to have gone away. I'm on Ubuntu 20.04.6. My new versions are:
nodejs: v20.11.0
npm: 10.2.4
ts-node: v10.9.2
Search Terms
ts-node
E:XXXXX\nodejs\node_modules\typescript\lib\typescript.js:139
for (let i = startIndex ?? 0; i < array.length; i++) {
^
SyntaxError: Unexpected token ?
at new Script (vm.js:79:7)
at createScript (vm.js:251:10)
at Object.runInThisContext (vm.js:303:10)
at Module._compile (internal/modules/cjs/loader.js:656:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
at Module.require (internal/modules/cjs/loader.js:636:17)
at require (internal/modules/cjs/helpers.js:20:18)
Expected Behavior
Actual Behavior
Steps to reproduce the problem
Minimal reproduction
Specifications
"extends": "@tsconfig/node10/tsconfig.json"
}
The text was updated successfully, but these errors were encountered: