While my application runs smoothly within VS2022, I encounter errors when attempting to run gulp and compile TypeScript sources. The errors look like the ones below. I have provided my tsconfig and package files; however, I am uncertain if I need to modify the gulp script.
C:/WebProjects/ITF/Web/node_modules/typescript/lib/lib.es6.d.ts(20624,14): error TS1005: ';' expected. C:/WebProjects/ITF/Web/node_modules/typescript/lib/lib.es6.d.ts(20625,14): error TS1005: ';' expected. C:/WebProjects/ITF/Web/node_modules/typescript/lib/lib.es6.d.ts(20626,14): error TS1005: ';' expected.
Compiling TypeScript sources
gulp.task("compile", gulp.series("clean", function () {
const stream = gulp.src("./App/**/*.ts")
.pipe(inlineNg2Template({
base: "/", // Angular2 application base folder
target: "es6", // Can swap to es5
indent: 2, // Indentation (spaces)
useRelativePaths: false, // Use components relative asset paths
removeLineBreaks: false, // Content will be included as one line
templateExtension: ".html", // Update according to your file extension
templateFunction: false // If using a function instead of a string for `templateUrl`, pass a reference to that function here
}))
.pipe(typescript(tsProject))
.pipe(ignore("References.js"))
.pipe(gulp.dest("dist/App"));
return stream;
}));
tsConfig
{
"compilerOptions": {
"target": "es5",
"module": "amd",
"moduleResolution": "node",
"removeComments": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"noEmitHelpers": false,
"sourceMap": true,
"noResolve": false,
"noEmitOnError": true,
"outDir": "dist/debug"
},
"filesGlob": [
"./**/*.ts",
"!./node_modules"
],
"exclude": [
"node_modules",
"jspm_packages",
"typings",
"dist",
"typings/*",
"typings/main.d.ts",
"typings/main",
"Scripts"
],
"compileOnSave": true,
"buildOnSave": true
}
Package
"dependencies": {
"@angular/cli": "^6.2.1",
"@angular/common": "4.4.7",
"@angular/compiler": "4.4.7",
"@angular/core": "4.4.7",
...
// Other dependencies listed here...
...
}