ussd-menu-builder
ussd-menu-builder copied to clipboard
Failed to get route: typeError: Cannot read properties of undefined (reading 'split') at UssdMenu.resolveRoute
I am getting this error whenever I try to my app. if you have bypassed this kindly assist.
Failed to get route: TypeError: Cannot read properties of undefined (reading 'split') at UssdMenu.resolveRoute (/var/task/node_modules/ussd-menu-builder/lib/ussd-menu.js:76:46) at /var/task/node_modules/ussd-menu-builder/lib/ussd-menu.js:357:22 /var/task/node_modules/ussd-menu-builder/lib/ussd-menu.js:365 return this.emit('error', new Error(err)); ^
Error: TypeError: Cannot read properties of undefined (reading 'split') at /var/task/node_modules/ussd-menu-builder/lib/ussd-menu.js:365:43 Emitted 'error' event on UssdMenu instance at: at /var/task/node_modules/ussd-menu-builder/lib/ussd-menu.js:365:29
Node.js v18.18.2
Could you share some sample code to reproduce the issue. It appears like it was trying to split a string but the string was undefined. How did you defined your routes?