Rastographics Rastographics - 7 months ago 45
TypeScript Question

Breeze Typescript Tooling

Using the fantastic Breeze Typescript Entity Generator tool but keep getting error

Error: Unable to locate the default implementation of the 'modelLibrary' interface. Possible options are 'ko', 'backingStore' or 'backbone'. See the breeze.config.initializeAdapterInstances method.

The error is happening at this line in tsgen-core.js:

var metadataStore = breeze.MetadataStore.importMetadata(metadata);

I am sure it is grabbing the metadata fine. It seems like I should be configuring breeze with an interfaceAdapter, but the example in the repo doesn't configure anything on breeze before using it to importMetadata for this tool.


We forgot to update tsgen.js for the latest version of breeze-client, which uses breeze.base.debug.js as the default js file instead of breeze.debug.js. The breeze.debug.js file has a default modelLibrary, but breeze.base.debug.js does not.

I've updated tsgen.js to use breeze.debug.js. Please get the latest and try again.