Skip to content

Error: Cannot read property 'type' of null #17

Closed
@GhEllie

Description

@GhEllie

Hi there ,

I used JsonApi with RC2 and it worked fine . I hace upgraded my project to RC5 and after that I have a problem with using JsonApiDatastoreConfig objects.
I have a class like this:
@Injectable()
@JsonApiDatastoreConfig({
baseUrl: 'http://localhost:9010/datasets/',
models: {
dataset: MarketTradeDataset,
datasetSpecifications: DatasetSpecification,
marketTradeDatasetItems: MarketTradeDatasetItem,
markets: Market
}
})
export class DataSetDatastore extends JsonApiDatastore {
}

when I want to inject this class to one my services I have the below error:
main.ts:78 TypeError: Cannot read property 'type' of null
at eval (http://localhost:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:13673:45)
at Array.forEach (native)
at getTransitiveModules (http://localhost:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:13672:17)
at CompileMetadataResolver._getTransitiveNgModuleMetadata (http://localhost:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:13387:37)
at CompileMetadataResolver.getNgModuleMetadata (http://localhost:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:13259:47)
at eval (http://localhost:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:13228:58)
at Array.forEach (native)
at CompileMetadataResolver.getNgModuleMetadata (http://localhost:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:13215:48)
at eval (http://localhost:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:13228:58)
at Array.forEach (native)

I tried to add JsonApiDatastore, JsonApiDatastoreConfig to my module.ts but I still have the same error.
Is anyone use this library with RC5?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions