let app = require('lotion')({
initialState: { count: 0 }
})
app.use((state, tx) => {
state.count++
})
app.listen(3000)
在运行此代码(我在 lotion js 官方网站上找到)时,我收到此错误
/home/kashika/node_modules/supercop.js/lib.js:97
throw ex;
^
TypeError: app.listen is not a function
at Object.<anonymous> (/home/kashika/prog.js:9:5)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Function.Module.runMain (module.js:694:10)
at startup (bootstrap_node.js:204:16)
at bootstrap_node.js:625:3