Page 1 of 1

Can't run NodeJs examples

Posted: Wed May 15, 2019 8:32 pm
by jminutella
Hi again,

I'm following the guide (https://www.bryntum.com/docs/siesta/#!/ ... ted_nodejs) and exploring running our tests with NodeJs. We have Siesta 5.2.2 standard and when I run
bin/nodejs path/to/examples/nodejs/unit-tests/basic_assertions.t.js
I get a
TypeError: Cannot read property 'Project' of undefined
See the image below.

Hopefully, I'm not missing something so obvious. Thanks!

Re: Can't run NodeJs examples

Posted: Wed May 15, 2019 9:23 pm
by nickolay
Hi,

Hm.. Thanks for the report, this definitely works for me, using Node 8.16.0 and on Linux though.
screenshot1.jpg
screenshot1.jpg (37.78 KiB) Viewed 3966 times
I'll check with Node 11 and on Windows tomorrow.

What if you launch the project file directly? (`node examples/nodejs/siesta.js`, where the `node` is the Node.js binary, not the "bin/nodejs" launcher)

Re: Can't run NodeJs examples

Posted: Wed May 15, 2019 9:52 pm
by nickolay
What if you `cd` to the Siesta folder and run `bin/nodejs examples/nodejs..../basic_assertions.t.js` from there?

Re: Can't run NodeJs examples

Posted: Thu May 16, 2019 9:39 am
by nickolay
Confirmed to be Node version related. Regression happened somewhere after the Node 10.5 (see screenshot). Thanks for the report, we'll fix this very soon.

Re: Can't run NodeJs examples

Posted: Thu May 16, 2019 11:16 am
by nickolay
Fixed now. Please verify in the tomorrow nightly. 5.2.3 planned for tomorrow.

Re: Can't run NodeJs examples

Posted: Fri May 17, 2019 3:22 pm
by jminutella
Hey nickolay,

Thanks so much for the quick response. I was out of the office yesterday so sorry for the delayed response. I just downloaded the nightly you suggested and I get this error:
siesta_node_5-16_nightly.PNG
siesta_node_5-16_nightly.PNG (40.93 KiB) Viewed 3954 times
However, it's worth noting that when I downgraded to NodeJS 10.15.3, I get this error:
nodejs_10_15_3_nodejsproject_error.PNG
nodejs_10_15_3_nodejsproject_error.PNG (48.5 KiB) Viewed 3954 times

Re: Can't run NodeJs examples

Posted: Fri May 17, 2019 3:25 pm
by jminutella
Do you suggest sticking with the NodeJS LTS version 10.15.3 instead?

Re: Can't run NodeJs examples

Posted: Fri May 17, 2019 3:36 pm
by nickolay
Hey,

About the `glob` error - it seems the nightly build comes w/o `node_modules` folder - we'll fix soon, in the meantime, try just `npm install` in the nightly folder.

Can you please try running Siesta examples with these 2 commands (from the nightly folder):
- `node examples/nodejs/siesta.js` - this uses "native" node.js binary to launch the siesta project file
- `bin/nodejs examples/nodejs`- this uses node.js launcher + glob pattern to choose the tests to run (the whole directory in this case)

About Node.js version - both should work now, but the LTS had received much better testing. We'll fix any issues with the latest node version promptly, so feel free to use it.

Re: Can't run NodeJs examples

Posted: Fri May 17, 2019 4:58 pm
by jminutella
Gotcha - I'm still getting the glob error and here's a screenshot with the commands you requested.

Re: Can't run NodeJs examples

Posted: Mon May 20, 2019 1:43 pm
by jminutella
Hey guys, any update on this?