不知道我在做什么错
const net = require('net')
const local = net.connect('./a',()=>console.log("connected!"))
./a
不存在。即使我使用tempy
模块生成随机路径,也遇到相同的问题错误:
events.js:187
throw er; // Unhandled 'error' event
^
Error: connect ENOENT ./a
at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1134:14)
Emitted 'error' event on Socket instance at:
at emitErrorNT (internal/streams/destroy.js:84:8)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
errno: -2,
code: 'ENOENT',
syscall: 'connect',
address: './a'
}