cd packages/react-juce
npm run init -- ~/MyProject/Source/jsui
and build it
cd ~/MyProject/Source/jsui
$ npm start
Point JUCE application to your JS build as described in guideline
Compile and run application
Result
Error in console:
Error: {}
at [anon] (/Users/vladislavvoinov/libs/blueprint/react_juce/duktape/extras/console/duk_console.c:49) internal
at error () native strict preventsyield
at jn (main.js:5098) strict
at [anon] (main.js:5098) strict
at me (main.js:5098) strict
at ye (main.js:5098) strict
at Hr (main.js:5098) strict
at Br (main.js:5098) strict
at Wr (main.js:5098) strict
at Rr (main.js:5098) strict
at cr (main.js:5098) strict
[...]
==== Error in JavaScript runtime. Context: ====
ctx: top=1, stack=["TypeError: undefined not callable (property 'addChild' of [object Object])\n at [anon] (/Users/vladislavvoinov/libs/blueprint/react_juce/duktape/src-noline/duktape.c:65639) internal\n at [anon] (main.js:5089) strict\n at [anon] (main.js:5089) strict\n at [anon] (main.js:5098) strict\n at nr (main.js:5098) strict\n at rr (main.js:5098) strict\n at or (main.js:5098) strict\n at Br (main.js:5098) strict\n at Wr (main.js:5098) strict\n at Rr (main.js:5098) strict\n at cr (main.js:5098) strict\n [...]"]
TypeError: undefined not callable (property 'addChild' of [object Object])
at [anon] (/Users/vladislavvoinov/libs/blueprint/react_juce/duktape/src-noline/duktape.c:65639) internal
at [anon] (main.js:5089) strict
at [anon] (main.js:5089) strict
at [anon] (main.js:5098) strict
at nr (main.js:5098) strict
at rr (main.js:5098) strict
at or (main.js:5098) strict
at Br (main.js:5098) strict
at Wr (main.js:5098) strict
at Rr (main.js:5098) strict
at cr (main.js:5098) strict
[...]
and on the screen(orange background + traces).
Fix
Turned out, template used in command
npm run init -- ~/MyProject/Source/jsui
has old version of react-juce, which expects "BlueprintNative" object to have a "addChild" method which is not supported:
Steps to reproduce
and build it
Result
Error in console:
and on the screen(orange background + traces).
Fix
Turned out, template used in command
npm run init -- ~/MyProject/Source/jsui
has old version of react-juce, which expects "BlueprintNative" object to have a "addChild" method which is not supported: