Skip to content

TypeError: Cannot read property 'path' of undefined #5

@jogelin

Description

@jogelin
  • I'm submitting a ...
    [X] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository

  • Do you want to request a feature or report a bug?
    I am not sure if it is a bug in the builder but I don't know how to debug it...

  • What is the current behavior?
    When I build a lib with an external dependency, I have an error:

=============================================
Compiling library forms
=============================================


[14:52:11] Starting '!build:webpack'...
Starting compilation using the angular compiler.
Angular compilation done, starting webpack bundling.
[14:52:16] '!build:webpack' errored after 4.11 s
[14:52:16] TypeError: Cannot read property 'path' of undefined
    at TsickleCompilerHost.getSourceMapKeyForSourceFile (D:\dev\projects\viper\shared-js\node_modules\tsickle\src\tsickle_compiler_host.ts:197:61)
    at TsickleCompilerHost.closurize (D:\dev\projects\viper\shared-js\node_modules\tsickle\src\tsickle_compiler_host.ts:319:14)
    at TsickleCompilerHost.getSourceFile (D:\dev\projects\viper\shared-js\node_modules\tsickle\src\tsickle_compiler_host.ts:166:21)
    at findSourceFile (D:\dev\projects\viper\shared-js\node_modules\@angular\tsc-wrapped\node_modules\typescript\lib\typescript.js:67716:29)
    at processImportedModules (D:\dev\projects\viper\shared-js\node_modules\@angular\tsc-wrapped\node_modules\typescript\lib\typescript.js:67863:25)
    at findSourceFile (D:\dev\projects\viper\shared-js\node_modules\@angular\tsc-wrapped\node_modules\typescript\lib\typescript.js:67744:17)
    at processImportedModules (D:\dev\projects\viper\shared-js\node_modules\@angular\tsc-wrapped\node_modules\typescript\lib\typescript.js:67863:25)
    at findSourceFile (D:\dev\projects\viper\shared-js\node_modules\@angular\tsc-wrapped\node_modules\typescript\lib\typescript.js:67744:17)
    at processSourceFile (D:\dev\projects\viper\shared-js\node_modules\@angular\tsc-wrapped\node_modules\typescript\lib\typescript.js:67647:27)
    at processRootFile (D:\dev\projects\viper\shared-js\node_modules\@angular\tsc-wrapped\node_modules\typescript\lib\typescript.js:67535:13)
    at D:\dev\projects\viper\shared-js\node_modules\@angular\tsc-wrapped\node_modules\typescript\lib\typescript.js:66825:60
    at Object.forEach (D:\dev\projects\viper\shared-js\node_modules\@angular\tsc-wrapped\node_modules\typescript\lib\typescript.js:1443:30)
    at Object.createProgram (D:\dev\projects\viper\shared-js\node_modules\@angular\tsc-wrapped\node_modules\typescript\lib\typescript.js:66825:16)
    at createProgram_1 (D:\dev\projects\viper\tools\@angular\tsc-wrapped\src\main.ts:58:17)
    at D:\dev\projects\viper\tools\@angular\tsc-wrapped\src\main.ts:160:28
    at <anonymous>
ERROR: Cannot read property 'path' of undefined
[14:52:16] '!compile' errored after 43 s
  • package.json of the library
{
  "description": "forms",
  "keywords": [ ],
  "libConfig": {
    "inlineResources": true
  },
  "dependencies": {
    "@ng2-dynamic-forms/core": "1.4.15",
    "@ng2-dynamic-forms/ui-ng-bootstrap": "1.4.15",
    "angular2-text-mask": "^8.0.1"
  },
  "peerDependencies": {
    "@angular/core": "^4.2.3",
    "@angular/common": "^4.2.3",
    "@angular/forms": "^4.2.3",
    "rxjs": "^5.4.1"
  }
}
  • javascript of the library
import { NgModule } from '@angular/core';
import { DynamicFormsCoreModule } from '@ng2-dynamic-forms/core';
import { DynamicFormsNGBootstrapUIModule } from '@ng2-dynamic-forms/ui-ng-bootstrap';

@NgModule({
  imports: [
    DynamicFormsCoreModule.forRoot(),
    DynamicFormsNGBootstrapUIModule
  ],
  declarations: [
  ],
  exports: [
  ]
})
export class AppFormsModule {
}
  • What is the expected behavior?
    To not have an error :-)

Maybe it's caused by the dynamic-form library but I don't know why, so I can't open an issue...

It works very well with other libraries and thanks again because this project has a very good enterprise vision !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions