Revadike / epicgames-freebies-claimer

Claim available free game promotions from the Epic Games Store.
MIT License
2.23k stars 361 forks source link

Error: Cannot find module '/app/data/device_auths.json' #133

Closed drkui closed 2 years ago

drkui commented 2 years ago

Hi, I'm running this through a Github Workflow and this week failed with the following error

> epicgames-freebies-claimer@1.5.4 start
> node claimer.js

node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module '/app/data/device_auths.json'
Require stack:
- /app/claimer.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/app/claimer.js:7:15)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12) ***
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/app/claimer.js' ]
***
Error: Process completed with exit code 1.

I reran DeviceAuthGenerator.exe to grab the contents of the json and put it in my secrets again to be safe and re-ran, but I still had the error.

Revadike commented 2 years ago

Try putting it both in the root and data folder

jackblk commented 2 years ago

Have you update the yaml file to this one?

https://github.com/Revadike/epicgames-freebies-claimer/wiki/Automatically-collect-freebies-with-Github-Actions#create-a-workflow

My workflow ran fine yesterday.

Edit: checked your repo, you haven't updated to the new file yet.

drkui commented 2 years ago

Have you update the yaml file to this one?

https://github.com/Revadike/epicgames-freebies-claimer/wiki/Automatically-collect-freebies-with-Github-Actions#create-a-workflow

My workflow ran fine yesterday.

Edit: checked your repo, you haven't updated to the new file yet.

Thanks! After updating the claim.yml file, I was able to get the workflow to run.