Closed johnspackman closed 4 years ago
Works fine for me ?
Installed versionlabel (qooxdoo/qxl.versionlabel, 1.0.0-beta.3) Installed Qooxdoo API Viewer (qooxdoo/qxl.apiviewer, 1.0.0-beta.7)
What's the error log?
Works for me, too. But I noticed another bug:
Weird; this is what I've just done:
[john@centos7 ~]$ node -v
bash: node: command not found
[john@centos7 ~]$ nvm use 12
Now using node v12.16.1 (npm v6.13.4)
[john@centos7 ~]$ node -v
v12.16.1
[john@centos7 ~]$ npm i -g @qooxdoo/compiler
# ... snip ...
[john@centos7 ~]$ qx create myFirstApp --noninteractive && cd myFirstApp && qx package install qooxdoo/qxl.apiviewer && qx serve --show-startpage
# ... snip ...
Web server started, please browse to http://localhost:8080
and then I browse to http://centos7:8080/compiled/source/apiviewer/index.html# and get this in the console:
000460 qx.core.Init: Load runtime: 460ms
part-boot-bundle-2.js:107184 000614 qx.core.Init: Main runtime: 145ms
part-boot-bundle-2.js:107184 000706 : The environment key 'apiviewer' is undefined.
qx.log.appender.Native.process() @ part-boot-bundle-2.js:107184
:8080/compiled/source/transpiled/qxl/apiviewer/Application.js:108 Uncaught TypeError: Cannot read property 'apiindex' of undefined
at wrapper.qxl.apiviewer.Application.prototype.finalize() [as finalize] (:8080/compiled/source/transpiled/qxl/apiviewer/Application.js:108)
at Object.qx.core.Init.ready() [as ready] (part-boot-bundle-1.js:36381)
at part-boot-bundle-1.js:17213
at Function.qx.event.Utils.then() [as then] (part-boot-bundle-1.js:27927)
at part-boot-bundle-1.js:17212
at Array.qx.lang.normalize.Array.forEach() [as forEach] (part-boot-bundle-1.js:2669)
at wrapper.qx.event.dispatch.Direct.prototype.dispatchEvent() (part-boot-bundle-1.js:17200)
at wrapper.wrappedFunction [as dispatchEvent] (part-boot-bundle-1.js:3906)
at wrapper.qx.event.Manager.prototype.dispatchEvent() [as dispatchEvent] (part-boot-bundle-1.js:11657)
at part-boot-bundle-1.js:13456
at Function.qx.event.Utils.then() [as then] (part-boot-bundle-1.js:27927)
at Object.qx.event.Registration.fireEvent() [as fireEvent] (part-boot-bundle-1.js:13455)
at wrapper.qx.event.handler.Application.prototype.__fireReady() [as __fireReady] (part-boot-bundle-1.js:35694)
at Function.qx.event.handler.Application.onScriptLoaded() [as onScriptLoaded] (part-boot-bundle-1.js:35625)
at done (boot.js:433)
at Object.signalStartup (boot.js:451)
DevTools failed to parse SourceMap: chrome-extension://gighmmpiobklfepjocnamgkkbiglidom/include.preload.js.map
DevTools failed to parse SourceMap: chrome-extension://gighmmpiobklfepjocnamgkkbiglidom/include.postload.js.map
The exception is in qxl.apiviewer.Application.finalize
, where it tries to get data with let apidata = qx.core.Environment.get("apiviewer");
but there is no data to return.
Where is the apiviewer
data supposed to come from?
It's generated in apiviewers compile.js. Seems that compile.js is not working for you.
Could you compile with verbose and check if the classfiles are analysed in compile.js?
Doesn't look like compile.js is being loaded:
[john@centos7 myFirstApp]$ rm -rf compiled
[john@centos7 myFirstApp]$ qx compile --verbose
Cannot find path source/resource required by library qxl.versionlabel
QooxDoo found in /home/john/.nvm/versions/node/v12.16.1/lib/node_modules/@qooxdoo/compiler/node_modules/@qooxdoo/framework
Browserslist: caniuse-lite is outdated. Please run next command `npm update`
[..................] | Writing Applications > Writing Application apiviewer
Completed all applications, libraries used are:
qxl.versionlabel (/home/john/myFirstApp/qx_packages/qooxdoo_qxl_versionlabel_v0_1_2)
myFirstApp (/home/john/myFirstApp)
qxl.apiviewer (/home/john/myFirstApp/qx_packages/qooxdoo_qxl_apiviewer_v0_1_20)
qx (/home/john/.nvm/versions/node/v12.16.1/lib/node_modules/@qooxdoo/compiler/node_modules/@qooxdoo/framework)
[john@centos7 myFirstApp]$ find . -name 'compile.*'
./compile.json
./qx_packages/qooxdoo_qxl_apiviewer_v0_1_20/compile.js
./qx_packages/qooxdoo_qxl_apiviewer_v0_1_20/compile.json
./qx_packages/qooxdoo_qxl_versionlabel_v0_1_2/compile.json
[john@centos7 myFirstApp]$ grep '"apiviewer' compiled/source/apiviewer/boot.js
[john@centos7 myFirstApp]$
hmm, this exact same command works as expected on my mac (with lots of analyse a.b.c.Classname
etc output), node 12.8 but using my master of the compiler...
ok, i found the cause - qx package install qooxdoo/qxl.apiviewer
was silently installing a very old, incompatible version of api viewer (version 0.1.20). I had to qx package upgrade
and remove and reinstall it
This code will produce an API viewer which crashes during startup: