$ cat foo.js
var bus = require('statebus').serve({})
state.foo = 'bar';
console.log(state.foo);
Running foo.js as sudo node foo.js:
TypeError: Cannot read property '0' of null
at bus.http_serve (/home/karthik/tawk.space/node_modules/statebus/server.js:1728:55)
at textbus.to_fetch (/home/karthik/tawk.space/node_modules/statebus/server.js:1703:24)
at /home/karthik/tawk.space/node_modules/statebus/statebus.js:800:31
at funk (/home/karthik/tawk.space/node_modules/statebus/statebus.js:918:35)
at Function.run_handler (/home/karthik/tawk.space/node_modules/statebus/statebus.js:856:16)
at bus.route (/home/karthik/tawk.space/node_modules/statebus/statebus.js:867:17)
at Function.bus.route (/home/karthik/tawk.space/node_modules/statebus/statebus.js:1662:20)
at Function.fetch (/home/karthik/tawk.space/node_modules/statebus/statebus.js:51:31)
at pget (/home/karthik/tawk.space/node_modules/statebus/statebus.js:1218:21)
at Object.get (/home/karthik/tawk.space/node_modules/statebus/statebus.js:1346:28)
Running foo.js as
sudo node foo.js
: