7

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';
       }
   }
}
2
  • relative paths should work. I've never had a problem. There is "dev2/test2" in the errored path. Is that correct? Commented May 30, 2015 at 10:53
  • Yes that is my project path. The full path does exist. I can do a "cat" command and it shows me the content of /Users/myname/dev2/test2/typings/angularjs/angular.d.ts Commented May 30, 2015 at 11:51

1 Answer 1

14

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.