-
Notifications
You must be signed in to change notification settings - Fork 130
Closed
Description
This morning our build was broken due to the 3.2 release of gulp-typescript. Setting the version to ~3.1.0 fixed the build. These were the errors I was getting:
2017-07-07T06:14:43.9933786Z public\app\core\authentication\authentication.spec.ts(5,18): error TS2304: Cannot find name 'AuthenticationService'.
2017-07-07T06:14:43.9933786Z public\app\core\authentication\authorization.api.spec.ts(5,18): error TS2304: Cannot find name 'AuthorizationApiService'.
2017-07-07T06:14:43.9933786Z public\app\core\authentication\authorization.spec.ts(5,18): error TS2304: Cannot find name 'AuthorizationService'.
2017-07-07T06:14:43.9933786Z public\app\core\language\language.api.spec.ts(5,18): error TS2304: Cannot find name 'LanguageApiService'.
2017-07-07T06:14:43.9933786Z public\app\core\language\language.spec.ts(5,18): error TS2304: Cannot find name 'LanguageService'.
...
2017-07-07T06:14:44.1808542Z [08:14:44] TypeScript: 16 semantic errors
2017-07-07T06:14:44.1808542Z [08:14:44] TypeScript: emit succeeded (with errors)
Is there a changelog available where I can check what may have cause the difference in behavior please?
Next are my gulpfile.js and tsconfig.json Maybe some tsconfig settings have changed behavior? Judging from the error output I'd guess it may be related to the including of type files.
Your gulpfile:
var tsProjectSpecs = ts.createProject(`${config.configDir}/tsconfig.spec.json`, {
outFile: config.testing.js.src.name,
});
var buildSpecs = function (haltOnError) {
// build specs typescript to javascript
// --------------------------------------
var tsResult = tsProjectSpecs.src()
.pipe(gulpIf(config.enableSourceMaps, sourcemaps.init()))
.pipe(tsProjectSpecs())
.once('error', function () {
if (haltOnError) {
this.once('finish', () => process.exit(1));
}
})
;
return tsResult.js
// annotate
.pipe(ngAnnotate())
.pipe(gulpIf(config.enableSourceMaps, sourcemaps.write('.')))
.pipe(gulp.dest(config.testing.outDir))
.pipe(browserSync.stream())
};
tsconfig.json
{
"compilerOptions": {
"module": "none",
"target": "es5",
"removeComments": false,
"sourceMap": true,
"inlineSources": true,
"outFile": "../.build/testing/specs_src.js",
"declaration": false,
"noFallthroughCasesInSwitch": true,
"noImplicitUseStrict": true,
"noImplicitThis": false,
"noUnusedLocals": true,
"noUnusedParameters": false,
"strictNullChecks": false,
"noImplicitReturns": false,
"noImplicitAny": false,
"rootDir": ".",
"typeRoots": [
"../typings",
"../node_modules/@types"
],
"types": [
"jasmine",
"ng-describe"
]
},
"include": [
"../test/mocks/*.ts",
"../test/helpers/*.ts",
"../public/app/**/*.spec.ts",
"../test/**/*.spec.ts",
"../typings/**/*",
"../.build/app/app_src.d.ts"
]
}
Metadata
Metadata
Assignees
Labels
No labels