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
I'm seeing a similar error when there are //-comments in tsconfig.json:
$ npm run clean
> display3@0.1.0 clean C:\Users\Phil\Documents\GitHub\display3
> gts clean
version: 12
SyntaxError: Error: C:\Users\Phil\Documents\GitHub\display3\tsconfig.json
Unexpected token / in JSON at position 114
at JSON.parse (<anonymous>)
at getBase (C:\Users\Phil\Documents\GitHub\display3\node_modules\gts\build\src\util.js:58:29)
at async Object.clean (C:\Users\Phil\Documents\GitHub\display3\node_modules\gts\build\src\clean.js:25:23)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! display3@0.1.0 clean: `gts clean`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the display3@0.1.0 clean script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Phil\AppData\Roaming\npm-cache\_logs\2020-12-29T11_54_44_103Z-debug.log
pastelmind
added a commit
to Loathing-Associates-Scripting-Society/display3
that referenced
this issue
Jan 4, 2021
Note: gts currently does not support comments inside tsconfig.json.
This is why I am leaving a detailed description here. Ugh...
See issue: google/gts#442
- Enable esModuleInterop, since we will use CommonJS modules such as
vhtml and mock-require
- Enable JSX options tailored for vhtml
- Configure lib so that we won't accidentally use APIs unsupported by
Rhino (and we're unwilling to polyfill them)
- Set transpilation target to ES5, since Rhino doesn't support several
ES2015 syntax (e.g. template strings)
- Configure directories transpiled
Note: Currently, these configs also apply to tests in spec/ and build
scripts in node-scripts/, even though they run inside Node.js and do not
need these limitations. We should add a separate tsconfig for these, and
possibly set up project references so that we can build all of them at
once.
gts fix
works well:gts clean
fails withNot Found
fortsconfig.json
which exists:Removing "comments" from
tsconfig.json
solves the issue.It would be nice if better error message (failed to parse) is produced or it accepts such non-standard syntax (the rest works well with it)
The text was updated successfully, but these errors were encountered: