My problem is an error during gulp compilation:
error TS6053: File '/Users/myname/dev2/test2/typings/angularjs/angular.d.ts' not found.
But the file realy exists! If i copied the d.ts files in the foo folder it will work. But that can't be a valid way. How do I have to define a valid reference? And aren't project-absolute paths possible?
paths:
source/modules/foo/controller.ts
typings/..
controller.ts:
/// <reference path="../../../typings/angularjs/angular.d.ts" />
module('app').controller("fooController",
[ "$scope",
($scope)
=> new Application.Controllers.fooController($scope)
]);
module Application.Controllers{
export class fooController{
constructor( $scope ){
$scope.name = 'I am foo Hans';
}
}
}
I found the issue!:
It was a setting in the gulpfile.js:
var tsResult = gulp.src('source/modules/**/*.ts')
.pipe(ts({
declarationFiles: true,
noExternalResolve: false
}));
The setting noExternalResolve was on true which made it searched only below "modules".
Thanks mrhobo for response.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With