Development setup

Hi,

I am trying to setup dev environment and following below guideline https://github.com/linagora/openpaas-esn/blob/master/doc/develop.md,
I am stucked in step no 6 and getting following error - please help me to resolve this, I am using OSX machine

penpaas-esn mkesharwani$ node ./bin/cli.js db --host 172.17.0.1
2019-11-05T09:41:05.035Z debug local/SUBSCRIBE to: amqp:disconnected
2019-11-05T09:41:05.038Z debug local/SUBSCRIBE to: amqp:client:available
2019-11-05T09:41:05.038Z debug local/SUBSCRIBE to: mongodb:connectionAvailable
TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type function
at Function.from (buffer.js:219:9)
at fnv1a32 (/Users/mkesharwani/Dev_openpaas/openpaas-esn/node_modules/bson/lib/bson/fnv1a.js:21:25)
at fnv1a24 (/Users/mkesharwani/Dev_openpaas/openpaas-esn/node_modules/bson/lib/bson/fnv1a.js:39:18)
at Object. (/Users/mkesharwani/Dev_openpaas/openpaas-esn/node_modules/bson/lib/bson/objectid.js:14:20)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:643:32)
at Function.Module._load (internal/modules/cjs/loader.js:556:12)
at Module.require (internal/modules/cjs/loader.js:683:19)
at require (internal/modules/cjs/helpers.js:16:16)
at Object. (/Users/mkesharwani/Dev_openpaas/openpaas-esn/node_modules/bson/lib/bson/bson.js:7:14)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:643:32)
at Function.Module._load (internal/modules/cjs/loader.js:556:12)
at Module.require (internal/modules/cjs/loader.js:683:19)
at require (internal/modules/cjs/helpers.js:16:16)
at Object. (/Users/mkesharwani/Dev_openpaas/openpaas-esn/node_modules/bson/index.js:1:12)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:643:32)
at Function.Module._load (internal/modules/cjs/loader.js:556:12)
at Module.require (internal/modules/cjs/loader.js:683:19)
at require (internal/modules/cjs/helpers.js:16:16)
at Object. (/Users/mkesharwani/Dev_openpaas/openpaas-esn/backend/core/tuple/index.js:1:18)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:643:32)

Dear Mekal
Did you try to see the notice in the 6 step ?

“172.17.0.1 is for linux. It’s the IP where MongoDB launched by docker-compose above can be reached. You will have to set your docker-machine IP on OS X or Windows.”

please check docker IP in your OSX when you start

after changing the docker ip host still getting same error

hdlpmimac01:openpaas-esn mkesharwani$ docker inspect -f ‘{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}’ fa418f261403
172.19.0.2
hdlpmimac01:openpaas-esn mkesharwani$ node ./bin/cli.js db --host 172.19.0.2
2019-11-05T11:54:57.119Z debug local/SUBSCRIBE to: amqp:disconnected
2019-11-05T11:54:57.121Z debug local/SUBSCRIBE to: amqp:client:available
2019-11-05T11:54:57.122Z debug local/SUBSCRIBE to: mongodb:connectionAvailable
TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type function
at Function.from (buffer.js:219:9)
at fnv1a32 (/Users/mkesharwani/Dev_openpaas/openpaas-esn/node_modules/bson/lib/bson/fnv1a.js:21:25)
at fnv1a24 (/Users/mkesharwani/Dev_openpaas/openpaas-esn/node_modules/bson/lib/bson/fnv1a.js:39:18)
at Object. (/Users/mkesharwani/Dev_openpaas/openpaas-esn/node_modules/bson/lib/bson/objectid.js:14:20)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:643:32)
at Function.Module._load (internal/modules/cjs/loader.js:556:12)
at Module.require (internal/modules/cjs/loader.js:683:19)
at require (internal/modules/cjs/helpers.js:16:16)
at Object. (/Users/mkesharwani/Dev_openpaas/openpaas-esn/node_modules/bson/lib/bson/bson.js:7:14)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:643:32)
at Function.Module._load (internal/modules/cjs/loader.js:556:12)
at Module.require (internal/modules/cjs/loader.js:683:19)
at require (internal/modules/cjs/helpers.js:16:16)
at Object. (/Users/mkesharwani/Dev_openpaas/openpaas-esn/node_modules/bson/index.js:1:12)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:643:32)
at Function.Module._load (internal/modules/cjs/loader.js:556:12)
at Module.require (internal/modules/cjs/loader.js:683:19)
at require (internal/modules/cjs/helpers.js:16:16)
at Object. (/Users/mkesharwani/Dev_openpaas/openpaas-esn/backend/core/tuple/index.js:1:18)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:643:32)
hdlpmimac01:openpaas-esn mkesharwani$

Dear Mekal
Could you give us more information about your OSX and tool ?
Which os version
Which node version
Which docker version
Which command you execute to start the docker, do you have any other log in docker

Hi Pham Tuan
Thanks for reply

Os version - osx 10.14.6
node version -v12.6.0
Docker version 19.03.2, build 6a30dfc
I am trying to excecute following commands

ESN_HOST=“172.17.0.1” ESN_PATH="$PWD" docker-compose -f ./docker/dockerfiles/dev/docker-compose.yml up

and

node ./bin/cli.js db --host 172.17.0.1

not shure how can I get ESN_HOST and docker machine ip,- I am using docker for mac could you help me with some information please

Hi Mekal,
Could you try to use node 10 (v10.17.0 is good), as my test when I update node 12 it has the same issue with you
HTH

Thanks, the when I downgraded my node to v10.16.0, this issue is resoved but Now I am getting another error, while running server.js, which I have posted in another thread. please help

Hi Mekail
My answer for your issue is here TypeError: Cannot destructure property `FIELD_TYPES` of 'undefined' or 'null'
HTH