Closed fakerli closed 2 years ago
if I change the code in Map.js from
image: ./src/resources/images/maps/${this.rustplus.guildId}_map_clean.png
,
to
image: /home/rustplus/rustPlusPlus/src/resources/images/maps/${this.rustplus.guildId}_map_clean.png
,
it hangs at:
[Error: ENOENT: no such file or directory, open './src/resources/fonts/PermanentMarker.fnt'] { errno: -2, code: 'ENOENT', syscall: 'open', path: './src/resources/fonts/PermanentMarker.fnt'
It works if I cd into the dir but not if I use node /home/rustplus/rustPlusPlus/.
It's because file open is based on process.cwd()
, not on __dirname
.
If you want to try out the docker branch it will resolve that issue.
Fixed in cd67be375a203ebd5c8e869482e2d98c36ff56d0
When I try to start the service after server reboot it doesn't work:
Error: ENOENT: no such file or directory, open './src/resources/images/maps/1013878657959350352_map_clean.png' at Object.openSync (node:fs:594:3) at Object.writeFileSync (node:fs:2207:35) at Map.writeMapClean (/home/rustplus/rustPlusPlus/src/structures/Map.js:252:18) at Map.resetImageAndMeta (/home/rustplus/rustPlusPlus/src/structures/Map.js:246:20) at new Map (/home/rustplus/rustPlusPlus/src/structures/Map.js:201:14) at Object.execute (/home/rustplus/rustPlusPlus/src/rustplusEvents/connected.js:48:28) at processTicksAndRejections (node:internal/process/task_queues:96:5) { errno: -2, syscall: 'open', code: 'ENOENT', path: './src/resources/images/maps/1013878657959350352_map_clean.png'
The files in this directory are:
rustplus@xxx:~/rustPlusPlus/src/resources/images/maps$ ls 1013878657959350352_map_clean.png 1013878657959350352_map_full.png 388411283105644555_map_clean.png 388411283105644555_map_full.png