Database queries not running on Nodejs in beta 4

Hi All,

Downloaded the new beta today. Saw that it had fixed an issue i was having with using parameters in a custom query, but now i can not get ANY query to run (even a brand new simple select all)

I keep getting this error message when i output to browser:

“message”:“settings is not defined”,“stack”:"ReferenceError: settings is not defined\n at App.define…

So far I have created a new folder, a new SC file and even created a new DB connection. All to no avail.

Is anyone else getting this?

Further to this. I have now created a brand new project, installed node from scratch etc and tried again. Same result. Full error message here:

{“message”:“settings is not defined”,“stack”:“ReferenceError: settings is not defined\n at App.define (C:\Switchley\nodeJS\test\lib\core\app.js:143:35)\n at C:\Switchley\nodeJS\test\lib\core\middleware.js:12:40\n at Layer.handle [as handle_request] (C:\Switchley\nodeJS\test\node_modules\express\lib\router\layer.js:95:5)\n at next (C:\Switchley\nodeJS\test\node_modules\express\lib\router\route.js:137:13)\n at next (C:\Switchley\nodeJS\test\node_modules\express\lib\router\route.js:131:14)\n at next (C:\Switchley\nodeJS\test\node_modules\express\lib\router\route.js:131:14)\n at next (C:\Switchley\nodeJS\test\node_modules\express\lib\router\route.js:131:14)\n at next (C:\Switchley\nodeJS\test\node_modules\express\lib\router\route.js:131:14)\n at next (C:\Switchley\nodeJS\test\node_modules\express\lib\router\route.js:131:14)\n at next (C:\Switchley\nodeJS\test\node_modules\express\lib\router\route.js:131:14)”}

I have same, wappler screwed, l will have to downgrade as i cant work with this bug

I’d be curious to know if anyone has been able to run any queries at all or if it’s more localised to select users like @Hyperbytes and I.

2 Likes

I have exactly the same error message

1 Like

Guessing it is anyone using node, php seems to work ok

We will release an update as soon as possible, to fix it temporary is to edit the file lib/core/app.js line 143: clone(settings) should become clone(cfg.settings).

Problem is only in node, not in other environments. Please note that node is currently beta and code changes a lot at the moment.

1 Like

FYI… @patrick I did play around with that and pretty sure I made that exact same change, and the error message then said “meta is not defined”

I then gave up at that point.

Didn’t fix the error for me patrick, meta not defined error

Ah, same error a few lines further.

At line 152 change await validator.init(this, meta); to await validator.init(this, this.meta);

  • message: “fields is not iterable”,

  • stack: “TypeError: fields is not iterable at Object.validateFields (F:\webs\findmystudentdigs\lib\validator\index.js:41:27) at Object.init (F:\webs\findmystudentdigs\lib\validator\index.js:6:20) at App.define (F:\webs\findmystudentdigs\lib\core\app.js:152:29) at F:\webs\findmystudentdigs\lib\core\middleware.js:12:40 at Layer.handle [as handle_request] (F:\webs\findmystudentdigs\node_modules\express\lib\router\layer.js:95:5) at next (F:\webs\findmystudentdigs\node_modules\express\lib\router\route.js:137:13) at next (F:\webs\findmystudentdigs\node_modules\express\lib\router\route.js:131:14) at next (F:\webs\findmystudentdigs\node_modules\express\lib\router\route.js:131:14) at next (F:\webs\findmystudentdigs\node_modules\express\lib\router\route.js:131:14) at next (F:\webs\findmystudentdigs\node_modules\express\lib\router\route.js:131:14)”

Just comment out the validator code at line 152, I have to write tests for it, haven’t had time to test all the code before the release yesterday.

Bingo

That seems to have got it working

This part is important. People shouldn’t be using node if:

  • The project is live or going live soon and/or

  • Not comfortable with beta software, bugs and workarounds.

2 Likes

I am still running my core projects in 2.9.1 only using 3 beta for silly throw away tests so I can learn a little of the Node side and report the bugs.
I would assume most people are or should be doing the same.

2 Likes

Doing same, between projects downtime to play with node also. But it is not good when my toys are broken. There are a lot of issues with the beta presently which would scare me off using it in any production situation

4 Likes

Mwahahaha, understand entirely.

This has worked for me too. Thanks.