socioboard / Socioboard-5.0

Socioboard is world's first and open source Social Technology Enabler. Socioboard Core is our flagship product.
http://www.socioboard.org
Other
1.16k stars 365 forks source link

pm2 start user.service.js Says [PM2][ERROR] Script not found: #258

Closed dineshrggit closed 2 years ago

dineshrggit commented 3 years ago

I have followed all the steps till starting the node services.

when I try to start the node service using pm2 start user.service.js it gives error: [PM2][ERROR] Script not found: /Social_board/Socioboard-5-2.0-master/socioboard-api/User/user.service.js

This error comes for all node services Feeds, Publish, Notification, Update.

Any help will be appreciated. TIA

sureshbabu1995 commented 3 years ago

Hi, @dineshrggit

I want few more details like

Version of pm2 pm2 user.service.js command running location

if possible, Screenshots of the error would be better.

or you can use npm run dev script to run with nodemon

dineshrggit commented 3 years ago

I am able to run command. I have to run pm2 start user.server.jspm2 instead of start user.service.js

Document has pm2 start user.service.js but actual file name is user.server.js.

I have another issue: user service is started but getting below error

error: Error: Configuration property "mailService" is not defined at Config.get (/Users/dinesh/Sites/gp/Social_board/Socioboard-5-2.0-master/socioboard-api/Common/node_modules/config/lib/config.js:182:11) at new userLibs (file:///Users/dinesh/Sites/gp/Social_board/Socioboard-5-2.0-master/socioboard-api/Common/Models/unAuthorized.model.js:34:59) at file:///Users/dinesh/Sites/gp/Social_board/Socioboard-5-2.0-master/socioboard-api/User/core/unAuthorized/unAuthorized.service.js:27:26 at ModuleJob.run (internal/modules/esm/module_job.js:170:25) at async Loader.import (internal/modules/esm/loader.js:178:24) at async Object.loadESM (internal/process/esm_loader.js:68:5), level: 'error', message: 'uncaughtException: Configuration property "mailService" is not defined\n' + 'Error: Configuration property "mailService" is not defined\n' + ' at Config.get (/Users/dinesh/Sites/gp/Social_board/Socioboard-5-2.0-master/socioboard-api/Common/node_modules/config/lib/config.js:182:11)\n' + ' at new userLibs (file:///Users/dinesh/Sites/gp/Social_board/Socioboard-5-2.0-master/socioboard-api/Common/Models/unAuthorized.model.js:34:59)\n' + ' at file:///Users/dinesh/Sites/gp/Social_board/Socioboard-5-2.0-master/socioboard-api/User/core/unAuthorized/unAuthorized.service.js:27:26\n' + ' at ModuleJob.run (internal/modules/esm/module_job.js:170:25)\n' + ' at async Loader.import (internal/modules/esm/loader.js:178:24)\n' + ' at async Object.loadESM (internal/process/esm_loader.js:68:5)', stack: 'Error: Configuration property "mailService" is not defined\n' + ' at Config.get (/Users/dinesh/Sites/gp/Social_board/Socioboard-5-2.0-master/socioboard-api/Common/node_modules/config/lib/config.js:182:11)\n' + ' at new userLibs (file:///Users/dinesh/Sites/gp/Social_board/Socioboard-5-2.0-master/socioboard-api/Common/Models/unAuthorized.model.js:34:59)\n' + ' at file:///Users/dinesh/Sites/gp/Social_board/Socioboard-5-2.0-master/socioboard-api/User/core/unAuthorized/unAuthorized.service.js:27:26\n' + ' at ModuleJob.run (internal/modules/esm/module_job.js:170:25)\n' + ' at async Loader.import (internal/modules/esm/loader.js:178:24)\n' + ' at async Object.loadESM (internal/process/esm_loader.js:68:5)',

sureshbabu1995 commented 3 years ago

Hi, @dineshrggit

I've updated the config files please check it and try to run it

Yeah, there's a config object missing from user service, I'll be updating the config files very soon

or you can find that object in other services, please copy-paste it in the user config folder as well.

sureshbabu1995 commented 2 years ago

Hi @dineshrggit

I hope the new config is fixed your issue.

I'm closing it for now, if you've queries related to this feel free to re-open it. If you have other queries then open a new ticket.