ui5experts / ui5-schemas

:rocket: UI5 Schemas allows you to develop SAPUI5/OpenUI5 XML at a maximum convenience. It downloads, upgrades and sets up SAPUI5/OpenUI5 XML schemas for a better development experience in your favorite IDE (if it is WebStorm ;).
MIT License
49 stars 8 forks source link

Cannot install schemas - runtime exception #18

Closed mrsimpson closed 5 years ago

mrsimpson commented 5 years ago

A shortdump says more than 100 words:

| => ui5-schemas 
ui5-schemas info Preparing 'sapui5' schemas in version 'latest'...
ui5-schemas info Yay, all schema files were successfully downloaded!
ui5-schemas info [enhance] Making schemas even cooler...
ui5-schemas error [enhance] TypeError: Cannot read property 'xsd:complexType' of undefined
    at sapUiCoreView (/Users/oliverjaegle/.nvm/versions/node/v8.11.4/lib/node_modules/ui5-schemas/lib/upgrade.js:27:34)
    at parser.parseString (/Users/oliverjaegle/.nvm/versions/node/v8.11.4/lib/node_modules/ui5-schemas/lib/upgrade.js:72:9)

Thanks for the effort of providing this, if it works, it's a must ;)

cschuff commented 5 years ago

Hi mrsimpson,

glad that you like it :)

It appears that the latest SAPUI5 sdk (https://sapui5.hana.ondemand.com/) does not provide schemas on CDN. Anyways schemas are still accessible when using a dedicated version (e.g. https://sapui5.hana.ondemand.com/1.65.1) or the openui5 sdk (https://openui5.hana.ondemand.com/).

So to workaround this for now you can either load a dedicated version:

$ npx ui5-schemas --version 1.65.1

or load the schemas from openui:

$ npx ui5-schemas --sdk openui5

I have been working on a fix but ended up rewriting the whole thing which of course is a much bigger effort and still continues... Hope that helps for now.

BR Chris