Config file path cannot be found
almereyda opened this issue · comments
jon ⚝ commented
After running start_server
, ports 5000, 6000 and 7777 were not bound in the container. This could be traced back to an error in the last but two service put to background before monitor.sh
, and stopped the subsequent from working.
root@1ed97d2c0e3e:/opt/seatable/seatable-server-latest/dtable-server# cat /opt/seatable/logs/dtable-server.log
internal/fs/utils.js:269
throw err;
^
Error: ENOENT: no such file or directory, open '/opt/seatable/seatable-server-3.0.0/dtable-server/dist/config/config.json'
at Object.openSync (fs.js:462:3)
at Object.readFileSync (fs.js:364:35)
at loadJsonFile (/opt/seatable/seatable-server-3.0.0/dtable-server/dist/src/utils/utils.js:53:26)
at Object.<anonymous> (/opt/seatable/seatable-server-3.0.0/dtable-server/dist/src/config/config.js:22:40)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18) {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: '/opt/seatable/seatable-server-3.0.0/dtable-server/dist/config/config.json'
}
[1]+ Exit 1 node dist/src/index.js &>> /opt/seatable/logs/dtable-server.log
In my case, I had to apply this patch to have start_server
boot up the whole stack.
# diff seatable-server-latest/dtable-server/dist/src/config/config.js.old seatable-server-latest/dtable-server/dist/src/config/config.js
19c19
< filePath = _path.default.join(__dirname, '../../config/config.json');
---
> filePath = _path.default.join(__dirname, '../../../config/config.json');