Skip to content

demo无法运行 #2

Description

@hezhoushuai

执行步骤

  1. 执行npm i
  2. 执行 node app.js 时候报错
/Users/hezhoushuai/Downloads/demo-master/node_modules/connect/lib/proto.js:70
if ('function' == typeof fn.handle) {
^

TypeError: Cannot read property 'handle' of undefined
at Function.app.use (/Users/lbp/Downloads/demo-master/node_modules/connect/lib/proto.js:70:30)
at Object. (/Users/lbp/Downloads/demo-master/app.js:6:4)
at Module._compile (module.js:577:32)
at Object.Module._extensions..js (module.js:586:10)
at Module.load (module.js:494:32)
at tryModuleLoad (module.js:453:12)
at Function.Module._load (module.js:445:3)
at Module.runMain (module.js:611:10)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:160:9)

解决办法

经调试为/lib/cube_middleware.js导出的scriptProcessor变量为undefined。将cube.init更改为cube.middleware即可正常执行。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions