TypeError: Cannot destructure property `FIELD_TYPES` of 'undefined' or 'null'

Dear Friends
Please help me to resolve following error, I am getting when I run node Server.js

grunt dev
Running “nodemon:dev” (nodemon) task
[nodemon] 1.19.4
[nodemon] to restart at any time, enter rs
[nodemon] watching dir(s): .
[nodemon] watching extensions: js,mjs,json
[nodemon] starting node --preserve-symlinks server.js
2019-11-10T18:14:42.458Z debug local/SUBSCRIBE to: amqp:disconnected
2019-11-10T18:14:42.461Z debug local/SUBSCRIBE to: amqp:client:available
2019-11-10T18:14:42.462Z debug local/SUBSCRIBE to: mongodb:connectionAvailable
2019-11-10T18:14:42.462Z debug local/SUBSCRIBE to: webserver:mongosessionstoreEnabled
2019-11-10T18:14:45.555Z debug local/SUBSCRIBE to: mongodb:connectionAvailable
2019-11-10T18:14:45.556Z debug local/SUBSCRIBE to: mongodb:connectionAvailable
2019-11-10T18:14:45.897Z debug local/SUBSCRIBE to: mongodb:connectionAvailable
2019-11-10T18:14:45.899Z debug local/SUBSCRIBE to: mongodb:connectionAvailable
2019-11-10T18:14:47.719Z info Add ldap provision provider
2019-11-10T18:14:47.721Z debug Loaded passport strategy mongo-ldap in folder ./auth/
2019-11-10T18:14:47.724Z debug Loaded passport strategy local in folder ./auth/
2019-11-10T18:14:47.726Z debug Loaded passport strategy mongo in folder ./auth/
2019-11-10T18:14:47.727Z debug Loaded passport strategy basic-mongo-ldap in folder ./auth/api/
2019-11-10T18:14:47.728Z debug Loaded passport strategy basic-mongo in folder ./auth/api/
2019-11-10T18:14:47.738Z debug Loaded passport strategy bearer in folder ./auth/api/
2019-11-10T18:14:47.739Z debug Loaded passport strategy jwt in folder ./auth/api/
2019-11-10T18:14:47.741Z debug local/SUBSCRIBE to: mongodb:connectionAvailable
2019-11-10T18:14:48.565Z debug local/SUBSCRIBE to: mongodb:connectionAvailable
2019-11-10T18:14:49.324Z debug local/SUBSCRIBE to: amqp:disconnected
2019-11-10T18:14:49.324Z debug local/SUBSCRIBE to: amqp:client:available
2019-11-10T18:14:50.897Z error Fatal error:: TypeError: Cannot destructure property FIELD_TYPES of ‘undefined’ or ‘null’.
at module.exports.dependencies (/Users/mkesharwani/Dev_openpaas/openpaas-esn/node_modules/linagora.esn.group/backend/lib/people/resolver.js:3:49)
at module.exports.dependencies (/Users/mkesharwani/Dev_openpaas/openpaas-esn/node_modules/linagora.esn.group/backend/lib/people/index.js:4:41)
at module.exports.dependencies (/Users/mkesharwani/Dev_openpaas/openpaas-esn/node_modules/linagora.esn.group/backend/lib/index.js:10:37)
at lib (/Users/mkesharwani/Dev_openpaas/openpaas-esn/node_modules/linagora.esn.group/index.js:34:49)
at Promise.apply (/Users/mkesharwani/Dev_openpaas/openpaas-esn/node_modules/linagora.esn.group/node_modules/q/q.js:1165:26)
at Promise.promise.promiseDispatch (/Users/mkesharwani/Dev_openpaas/openpaas-esn/node_modules/linagora.esn.group/node_modules/q/q.js:788:41)
at /Users/mkesharwani/Dev_openpaas/openpaas-esn/node_modules/linagora.esn.group/node_modules/q/q.js:1391:14
at runSingle (/Users/mkesharwani/Dev_openpaas/openpaas-esn/node_modules/linagora.esn.group/node_modules/q/q.js:137:13)
at flush (/Users/mkesharwani/Dev_openpaas/openpaas-esn/node_modules/linagora.esn.group/node_modules/q/q.js:125:13)
at process._tickCallback (internal/process/next_tick.js:61:11)
2019-11-10T18:14:50.897Z error TypeError: Cannot destructure property FIELD_TYPES of ‘undefined’ or ‘null’.
at module.exports.dependencies (/Users/mkesharwani/Dev_openpaas/openpaas-esn/node_modules/linagora.esn.group/backend/lib/people/resolver.js:3:49)
at module.exports.dependencies (/Users/mkesharwani/Dev_openpaas/openpaas-esn/node_modules/linagora.esn.group/backend/lib/people/index.js:4:41)
at module.exports.dependencies (/Users/mkesharwani/Dev_openpaas/openpaas-esn/node_modules/linagora.esn.group/backend/lib/index.js:10:37)
at lib (/Users/mkesharwani/Dev_openpaas/openpaas-esn/node_modules/linagora.esn.group/index.js:34:49)
at Promise.apply (/Users/mkesharwani/Dev_openpaas/openpaas-esn/node_modules/linagora.esn.group/node_modules/q/q.js:1165:26)
at Promise.promise.promiseDispatch (/Users/mkesharwani/Dev_openpaas/openpaas-esn/node_modules/linagora.esn.group/node_modules/q/q.js:788:41)
at /Users/mkesharwani/Dev_openpaas/openpaas-esn/node_modules/linagora.esn.group/node_modules/q/q.js:1391:14
at runSingle (/Users/mkesharwani/Dev_openpaas/openpaas-esn/node_modules/linagora.esn.group/node_modules/q/q.js:137:13)
at flush (/Users/mkesharwani/Dev_openpaas/openpaas-esn/node_modules/linagora.esn.group/node_modules/q/q.js:125:13)
at process._tickCallback (internal/process/next_tick.js:61:11)
[nodemon] app crashed - waiting for file changes before starting…

Hi @Mekal

I guess this error is caused by out date code when there is a new feature on master branch of OpenPaaS, to resolve it, you just need to pull the latest of code of esn and re run grunt dev

Enjoy and tell me if if still there after having latest code.

Thanks tuanic, I have pulled the fresh code, and that error is gone, but I encountered below error can you please help me on this.

2019-11-11T07:34:46.484Z debug Adding contact importer: {“ns”:“contact.import.google”,“name”:“google”,“lib”:{“importer”:{},“mapping”:{}},“frontend”:{“staticPath”:"/Users/mkesharwani/Dev_openpaas/openpaas-esn/modules/linagora.esn.contact.import.google/frontend",“modules”:[“app.js”,“constants.js”,“services.js”,“directives.js”],“moduleName”:“linagora.esn.contact.import.google”}}
2019-11-11T07:34:46.484Z debug Adding the google importer
Web server failed to start { Error: listen EADDRINUSE: address already in use :::8080
at Server.setupListenHandle [as _listen2] (net.js:1279:14)
at listenInCluster (net.js:1327:12)
at doListen (net.js:1460:7)
at process._tickCallback (internal/process/next_tick.js:63:19)
code: ‘EADDRINUSE’,
errno: ‘EADDRINUSE’,
syscall: ‘listen’,
address: ‘::’,
port: 8080 }
Something is already listening on the Web server port 8080
2019-11-11T07:34:46.489Z error Fatal error:: Error: listen EADDRINUSE: address already in use :::8080
at Server.setupListenHandle [as _listen2] (net.js:1279:14)
at listenInCluster (net.js:1327:12)
at doListen (net.js:1460:7)
at process._tickCallback (internal/process/next_tick.js:63:19)
2019-11-11T07:34:46.489Z error Error: listen EADDRINUSE: address already in use :::8080
at Server.setupListenHandle [as _listen2] (net.js:1279:14)
at listenInCluster (net.js:1327:12)
at doListen (net.js:1460:7)
at process._tickCallback (internal/process/next_tick.js:63:19)
[nodemon] app crashed - waiting for file changes before starting…

Hi,
Can you create new thread for this issue?

Hi Mekal,
The last log I have saw that you have an in used port
“Web server failed to start { Error: listen EADDRINUSE: address already in use :::8080”
It mean that there is an other node process is running
Please check the process to make sure before you start “grunt dev” there is no any process are using 8080

Hi
I have restarted the machine and run again grunt-dev, now the port error is not comming.