I have a fresh 19.07.4 router, and am trying https://github.com/openwrt/luci/wiki/ModulesHowTo. I got the Actions example going, and the Views example also works fine.
When I try the CBI models example, I get a stack trace
/usr/lib/lua/luci/dispatcher.lua:1334: module 'luci.cbi' not found:
no field package.preload['luci.cbi']
no file './luci/cbi.lua'
no file '/usr/share/lua/luci/cbi.lua'
no file '/usr/share/lua/luci/cbi/init.lua'
no file '/usr/lib/lua/luci/cbi.lua'
no file '/usr/lib/lua/luci/cbi/init.lua'
no file './luci/cbi.so'
no file '/usr/lib/lua/luci/cbi.so'
no file '/usr/lib/lua/loadall.so'
no file './luci.so'
no file '/usr/lib/lua/luci.so'
no file '/usr/lib/lua/loadall.so'
stack traceback:
[C]: in function 'require'
/usr/lib/lua/luci/dispatcher.lua:1334: in function '_cbi'
/usr/lib/lua/luci/dispatcher.lua:1023: in function 'dispatch'
/usr/lib/lua/luci/dispatcher.lua:478: in function </usr/lib/lua/luci/dispatcher.lua:477>
I also tried the simpler https://openwrt.org/docs/guide-developer/luci CBI example, and got the same stack trace.
The only file on the router called cbi is /www/luci-static/resources/cbi.js