I am encountering an issue with my VS Code and Node.js project that uses Typescript. Within my package.json file's script
block, there is an entry:
"build-ts": "tsc"
When I run simply tsc
on the integrated terminal command line, the compilation proceeds without any errors. However, if I try to execute npm run build-ts
, it highlights syntax errors in one of the files. It appears that this error may be due to using an outdated compiler version.
Upon running tsc -v
on the command line, it displays Version 2.9.2. Could it be possible that npm run
is utilizing a different version of tsc?
Furthermore, I am curious if npm run
is part of the npm-run-script package as mentioned in the documentation. After performing an npm list
, I was unable to locate npm-run-script either locally or globally.