module.exports=DemoModule;var demo=require('./demomodule');错误提示:Error: Cannot find module './demomodule'
at Function.Module._resolveFilename (module.js:338:15
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at repl:1:10
at REPLServer.self.eval (repl.js:110:21)
at repl.js:249:20
at REPLServer.self.eval (repl.js:122:7)
at Interface.<anonymous> (repl.js:239:12)
at Interface.EventEmitter.emit (events.js:95:17)
必须要在两个文件中。这句代码必须放在demomodule.js中:module.exports=DemoModule;