ryanvolum / offline-directline

Unofficial package to emulate the bot framework connector locally.
https://www.npmjs.com/package/offline-directline
78 stars 44 forks source link

The Sample code results in an Error: listen EACCES: permission denied http://127.0.0.1:3000 #42

Closed newbienewbie closed 5 years ago

newbienewbie commented 5 years ago

As the title describes, when running sample/index.js, the following error occurs :

PS F:\source code research\BotBuilder\offline_dl> node .\samples\index.js
events.js:167
      throw er; // Unhandled 'error' event
      ^

Error: listen EACCES: permission denied http://127.0.0.1:3000
    at Server.setupListenHandle [as _listen2] (net.js:1273:19)
    at listenInCluster (net.js:1338:12)
    at Server.listen (net.js:1436:5)
    at Function.listen (F:\source code research\BotBuilder\offline_dl\node_modules\express\lib\application.js:618:24)
    at Object.exports.initializeRoutes (F:\source code research\BotBuilder\offline_dl\dist\bridge.js:176:9)
    at Object.<anonymous> (F:\source code research\BotBuilder\offline_dl\samples\index.js:5:12)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
Emitted 'error' event at:
    at emitErrorNT (net.js:1317:8)
    at process._tickCallback (internal/process/next_tick.js:63:19)
    at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)

It is caused by this line:

https://github.com/ryanvolum/offline_dl/blob/4e8de612ead052c9d21adce9ecda227d32ca01f0/samples/index.js#L5

The port parameter should be an int of 3000 rather than a string of http://127.0.0.1:3000