TypeError: Arguments to path.join must be strings at f (path.js:204:15) at Object.filter (native) at exports.join (path.js:209:40) at exports.send (E:nodejsdemosocket.io-expressnode_modulesexpressnode_modulesconnectlibmiddlewarestatic.js:129:20) at ServerResponse.res.sendfile (E:nodejsdemosocket.io-expressnode_modulesexpresslibresponse.js:186:3) at io.sockets.on.socket.emit.text (E:nodejsdemosocket.io-expressapp.js:8:6) at callbacks (E:nodejsdemosocket.io-expressnode_modulesexpresslibrouterindex.js:272:11) at param (E:nodejsdemosocket.io-expressnode_modulesexpresslibrouterindex.js:246:11) at pass (E:nodejsdemosocket.io-expressnode_modulesexpresslibrouterindex.js:253:5) at Router._dispatch (E:nodejsdemosocket.io- expressnode_modulesexpresslibrouterindex.js:280:5)
var express = require('express');var app = module.exports = express.createServer(), io = require('socket.io').listen(app); app.listen(3000); app.get('/', function(req, res){ res.sendfile(__dirname + '/index. 那种路径样子..然后到创建流的时候路径就不对了..
参考资料:https://github.com/visionmedia/send