Cannot read property 'render' of undefined


#1

I’m creating my first workspace with an example which consist on listing my customer table in a datatable (No profound logic datatable) but I’m getting error Cannot read property ‘render’ of undefined, my workspace is called Customer Crud I would appreciate the help of anyone on this.


#2

Hi there!

In order to have the request and response available, you must designate your start file as an Express Route in File Properties. So, right-click the list.js file, select Properties, and make sure Express Route is checked.

image

Also, I believe ejs should already be available on NodeRun, so you don’t have to install the ejs package into your workspace.

Let me know if this helps.

Alex


#3

Thank you Alex that worked. Now I’m able to going on developing my example.


#4

I’m trying to do the same thing with Profoundjs and getting same error. However, I’m trying on our local IBMi server,not on NodeRun. So, is there a way to manually add Express Route?

I don’t see Express Route box under file properties. Any clue?

Thanks.


#5

This is set up differently in Profound.js. To define Express routes, you have to edit the ‘start.js’ in your Profound.js installation directory and add calls to ‘profoundjs.express()’. See the Profound.js docs for more info.


#6

Great! I’ll try it. Thanks.