TypeStrong / dts-bundle

Export TypeScript .d.ts files as an external module definition
MIT License
308 stars 57 forks source link

Cannot read property 'file' of undefined #28

Closed mribichich closed 8 years ago

mribichich commented 8 years ago

I'm having this error:

  TypeError: Cannot read property 'file' of undefined
    at node_modules\dts-bundle\lib\index.js:124:55
    at Array.forEach (native)
    at Object.bundle (node_modules\dts-bundle\lib\index.js:122:35)

this is the verbose output:

> ### settings ###
main:         dist\dts\index.d.ts
name:         tss-angular
out:          D:\SVN TSS\_github\tss-ar\angular\dist\app\index.d.ts
baseDir:      D:\SVN TSS\_github\tss-ar\angular\dist\dts
mainFile:     D:\SVN TSS\_github\tss-ar\angular\dist\dts\index.d.ts
outFile:      D:\SVN TSS\_github\tss-ar\angular\dist\app\index.d.ts
externals:    no
exclude:      null
removeSource: no
comments:     no

> ### find typings ###
source typings (will be included in output if actually used)
 - D:\SVN TSS\_github\tss-ar\angular\dist\dts\app.d.ts
 - D:\SVN TSS\_github\tss-ar\angular\dist\dts\components.d.ts
 - D:\SVN TSS\_github\tss-ar\angular\dist\dts\components\feedback\feedback.d.ts
 - D:\SVN TSS\_github\tss-ar\angular\dist\dts\components\sort\sort.d.ts
 - D:\SVN TSS\_github\tss-ar\angular\dist\dts\directives.d.ts
 - D:\SVN TSS\_github\tss-ar\angular\dist\dts\directives\datepickerPopup.d.ts
 - D:\SVN TSS\_github\tss-ar\angular\dist\dts\directives\datetimepicker.d.ts
 - D:\SVN TSS\_github\tss-ar\angular\dist\dts\directives\draggable.d.ts
 - D:\SVN TSS\_github\tss-ar\angular\dist\dts\directives\fileModel.d.ts
 - D:\SVN TSS\_github\tss-ar\angular\dist\dts\directives\focusMe.d.ts
 - D:\SVN TSS\_github\tss-ar\angular\dist\dts\directives\ngEnter.d.ts
 - D:\SVN TSS\_github\tss-ar\angular\dist\dts\directives\preview.d.ts
 - D:\SVN TSS\_github\tss-ar\angular\dist\dts\directives\pxStyle.d.ts
 - D:\SVN TSS\_github\tss-ar\angular\dist\dts\directives\rcDisabled.d.ts
 - D:\SVN TSS\_github\tss-ar\angular\dist\dts\directives\removeHref.d.ts
 - D:\SVN TSS\_github\tss-ar\angular\dist\dts\directives\webcam.d.ts
 - D:\SVN TSS\_github\tss-ar\angular\dist\dts\entities.d.ts
 - D:\SVN TSS\_github\tss-ar\angular\dist\dts\entities\alertType.d.ts
 - D:\SVN TSS\_github\tss-ar\angular\dist\dts\entities\feedback.d.ts
 - D:\SVN TSS\_github\tss-ar\angular\dist\dts\entities\feedbackType.d.ts
 - D:\SVN TSS\_github\tss-ar\angular\dist\dts\filters\tssHighlight.d.ts
 - D:\SVN TSS\_github\tss-ar\angular\dist\dts\index.d.ts
 - D:\SVN TSS\_github\tss-ar\angular\dist\dts\servicies.d.ts
 - D:\SVN TSS\_github\tss-ar\angular\dist\dts\servicies\alertService.d.ts
 - D:\SVN TSS\_github\tss-ar\angular\dist\dts\servicies\rcDisabled.d.ts
excluded typings (will always be excluded from output)

> ### parse files ###
index (D:\SVN TSS\_github\tss-ar\angular\dist\dts\index.d.ts)
 - import relative ./entities (D:\SVN TSS\_github\tss-ar\angular\dist\dts\entities.d.ts)
 - import relative ./servicies/alertService (D:\SVN TSS\_github\tss-ar\angular\dist\dts\servicies\alertService.d.ts)
entities (D:\SVN TSS\_github\tss-ar\angular\dist\dts\entities.d.ts)
 - import relative ./entities/alertType (D:\SVN TSS\_github\tss-ar\angular\dist\dts\entities\alertType.d.ts)
 - import relative ./entities/feedback (D:\SVN TSS\_github\tss-ar\angular\dist\dts\entities\feedback.d.ts)
 - import relative ./entities/feedbackType (D:\SVN TSS\_github\tss-ar\angular\dist\dts\entities\feedbackType.d.ts)
servicies\alertService (D:\SVN TSS\_github\tss-ar\angular\dist\dts\servicies\alertService.d.ts)
 - import external tss-angular/entities
entities\alertType (D:\SVN TSS\_github\tss-ar\angular\dist\dts\entities\alertType.d.ts)
entities\feedback (D:\SVN TSS\_github\tss-ar\angular\dist\dts\entities\feedback.d.ts)
 - import relative ./feedbackType (D:\SVN TSS\_github\tss-ar\angular\dist\dts\entities\feedbackType.d.ts)
entities\feedbackType (D:\SVN TSS\_github\tss-ar\angular\dist\dts\entities\feedbackType.d.ts)

> ### map exports ###

> ### determine typings to include ###
queue
[ { file: 'D:\\SVN TSS\\_github\\tss-ar\\angular\\dist\\dts\\index.d.ts',
    name: 'index',
    indent: '    ',
    exp: 'tss-angular',
    refs: [],
    externalImports: [],
    relativeImports:
     [ 'D:\\SVN TSS\\_github\\tss-ar\\angular\\dist\\dts\\entities.d.ts',
       'D:\\SVN TSS\\_github\\tss-ar\\angular\\dist\\dts\\servicies\\alertService.d.ts' ],
    exports: [],
    lines: [ [Object], [Object] ],
    importLineRef: [ [Object], [Object] ],
    relativeRef: [] } ]
index (D:\SVN TSS\_github\tss-ar\angular\dist\dts\index.d.ts)
 - import relative D:\SVN TSS\_github\tss-ar\angular\dist\dts\entities.d.ts
 - import relative D:\SVN TSS\_github\tss-ar\angular\dist\dts\servicies\alertService.d.ts
entities (D:\SVN TSS\_github\tss-ar\angular\dist\dts\entities.d.ts)
 - import relative D:\SVN TSS\_github\tss-ar\angular\dist\dts\entities\alertType.d.ts
 - import relative D:\SVN TSS\_github\tss-ar\angular\dist\dts\entities\feedback.d.ts
 - import relative D:\SVN TSS\_github\tss-ar\angular\dist\dts\entities\feedbackType.d.ts
servicies\alertService (D:\SVN TSS\_github\tss-ar\angular\dist\dts\servicies\alertService.d.ts)
tolemac commented 8 years ago

I'm not sure if the last commits resolve this problem, If I am not wrong you are trying use dts-bundle with https://github.com/tss-ar/angular project. I will test it ASAP.

I have added bug label to the issue due to dts-bundle try to access to file without test if it exists, I want to fix it ASAP. I will use your project for test it.

tolemac commented 8 years ago

I have clone your repository tss-ar/angular and work fine.

Can you help me to reproduce the error?

mribichich commented 8 years ago

Yes sure, let me prepare the code again, because I end up changing it, and I let you know. Thanks

tolemac commented 8 years ago

Close the issue to release 0.4.0 version.

New version support not exitings files see "Files not found" section of readme file.

Let me know here if you have problems.

mribichich commented 8 years ago

Sorry for the delay on the answer. I'll try the new version and let you know if it happens again.

thanks

On Sat, Jan 16, 2016 at 6:13 AM Javier Ros notifications@github.com wrote:

Close the issue to release 0.4.0 version.

New version support not exitings files see "Files not found" section of readme file.

Let me know here if you have problems.

— Reply to this email directly or view it on GitHub https://github.com/TypeStrong/dts-bundle/issues/28#issuecomment-172175846 .