I have VS Code and a Node.js project using Typescript. In my package.json script
block there is an item:
"build-ts": "tsc"
If I run plain tsc
on the integrated terminal command line, the compilation is fine. But if I invoke npm run build-ts
, it detects syntax errors on one file. The cause of the error seems to be from an older compiler version.
If I run tsc -v
on the command line, it shows Version 2.9.2. Does npm run
use another version of tsc somewhere?
By the way, is npm run
from the package npm-run-script? I ran an npm list
and I could not find npm-run-script locally or globally.