SyntaxError: Unexpected token '.'
Closed this issue · 2 comments
greg-flexidao commented
yarn run v1.22.10
$ tsc
Hook Module named "copy-files" threw an error, more information bellow:
/home/project/node_modules/tsc-hooks/hooks/copy-files.js:8
const include = tsconfig.include?.map(file => path.resolve(tsconfigDir, file));
^
SyntaxError: Unexpected token '.'
at wrapSafe (internal/modules/cjs/loader.js:931:16)
swimauger commented
This looks like node might be having trouble with the new ES11 syntax for optional chaining.
If you use Node version 14 or greater, should fix your problem, but if other things are prohibiting you from using a more modern node version, I could be compelled to make support for earlier versions.
swimauger commented
Closing for now, will consider integrating with Babel in a version >=v1.1.0