0x796935 / factorio-achievement-restore

Restores the achievements after running commands which disable them
GNU General Public License v3.0
18 stars 4 forks source link

gettin error #4

Closed CHHE-ledtec closed 1 week ago

CHHE-ledtec commented 4 months ago

OS:POPos latest npm

48: new space.zip 49: new space_dead.zip 50: sandbox.zip Enter a number: 48 You picked: new space.zip (node:177545) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, copyfile '/home/chhe/.factorio/saves/new space.zip' -> './temp/savegame.zip' at Object.copyFileSync (fs.js:1907:3) at file:///home/chhe/factorio-achievement-restore/packer.mjs:85:14 at Interface._onLine (readline.js:327:5) at Interface._line (readline.js:658:8) at Interface._ttyWrite (readline.js:1003:14) at ReadStream.onkeypress (readline.js:205:10) at ReadStream.emit (events.js:314:20) at emitKeys (internal/readline/utils.js:335:14) at emitKeys.next () at ReadStream.onData (readline.js:1137:36) (node:177545) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:177545) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

rezarria commented 4 months ago

Hello @CHHE-ledtec, I am currently trying to reproduce the error as per your description. I am using PopOS version 22.04 LTS.

This error is likely occurring because your Node.js version is v12, which does not include some functions used in the program. You need to upgrade to version v14.

I know that PopOS currently only has v12 as the latest version. Please visit the Node.js website to install the appropriate Node.js and npm versions. Choose version 14 or higher and select the nvm if you are familiar with it.

0x796935 commented 1 week ago

Closing due to inactivity + Possible solution