TypeError: Cannot read property 'schemaName' of undefined
See original GitHub issueHi there. I keep running into this error when trying to startup my application. I’ve looked for help in Google, with no luck. Unfortunately i can’t share much of the code, but here’s the stacktrace:
[18:18:32.087] 47383 NOTE api/layout/List — Generating List endpoint for layout
[18:18:32.093] 47383 ERROR node_modules/rest-hapi/utilities/rest-helper-factory.js:98:16 api — Error: TypeError: Cannot read property 'schemaName' of undefined
[18:18:32.093] 47383 ERROR node_modules/rest-hapi/utilities/rest-helper-factory.js:98:16 api — at Object.generateJoiModelFromFieldType (/var/www/private/node_modules/rest-hapi/utilities/joi-mongoose-helper.js:213:27)
[18:18:32.093] 47383 ERROR node_modules/rest-hapi/utilities/rest-helper-factory.js:98:16 api — at /var/www/private/node_modules/rest-hapi/utilities/rest-helper-factory.js:169:46
[18:18:32.093] 47383 ERROR node_modules/rest-hapi/utilities/rest-helper-factory.js:98:16 api — at arrayEach (/var/www/private/node_modules/rest-hapi/node_modules/lodash/index.js:1289:13)
[18:18:32.093] 47383 ERROR node_modules/rest-hapi/utilities/rest-helper-factory.js:98:16 api — at Function.<anonymous> (/var/www/private/node_modules/rest-hapi/node_modules/lodash/index.js:3345:13)
[18:18:32.093] 47383 ERROR node_modules/rest-hapi/utilities/rest-helper-factory.js:98:16 api — at Object.generateListEndpoint (/var/www/private/node_modules/rest-hapi/utilities/rest-helper-factory.js:168:11)
[18:18:32.093] 47383 ERROR node_modules/rest-hapi/utilities/rest-helper-factory.js:98:16 api — at Object.generateRoutes (/var/www/private/node_modules/rest-hapi/utilities/rest-helper-factory.js:51:16)
[18:18:32.093] 47383 ERROR node_modules/rest-hapi/utilities/rest-helper-factory.js:98:16 api — at /var/www/private/node_modules/rest-hapi/rest-hapi.js:92:36
[18:18:32.093] 47383 ERROR node_modules/rest-hapi/utilities/rest-helper-factory.js:98:16 api — at process.nextTick (/var/www/private/node_modules/hapi/node_modules/hoek/lib/index.js:858:22)
[18:18:32.093] 47383 ERROR node_modules/rest-hapi/utilities/rest-helper-factory.js:98:16 api — at _combinedTickCallback (internal/process/next_tick.js:73:7)
[18:18:32.093] 47383 ERROR node_modules/rest-hapi/utilities/rest-helper-factory.js:98:16 api — at process._tickCallback (internal/process/next_tick.js:104:9)
Tell me if you need more details. I’m using the latest version of rest-hapi. Thanks.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
TypeError: Cannot read property 'schema' of undefined #1200
I am trying to create an update autoform. I have tried to pass the document as a template helper and local data context, ......
Read more >express-openapi-validator: ERROR: TypeError: Cannot read ...
I have a openapi schema definition like this:
Read more >TypeError: Cannot read property 'schema' of undefined
Hello, i want to write some Values in a Influx Database (V1.8) If i send this, it works: { "_msgid": "add6566.b6dd4a8", ...
Read more >TypeError: Cannot read property 'schema' of undefined
I get this error while validating this swagger file. According to swagger-cli, this file is valid and I cannot understand the reason.
Read more >TypeError: Cannot read property 'validate' of undefined? - React
“Cannot read property 'validate' of undefined”? Anyone can help in finding the error. ... Is there any more to that error? For example...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks @JKHeadley, I used the first solution and it worked.
I also found another way to fix it:
yes, it is due to the empty
cols
array. If you assign a type to the array, it should fix that, for example:or even
should work.