Skip to content

TypeError: Cannot read properties of undefined (reading 'Tokens') #221

@Kris9711

Description

@Kris9711

Hi, today when I tried to run bots I got this error message:

pi@raspberrypi:~ $ sudo nodejs /home/pi/inspect/index.js
/home/pi/inspect/lib/game_data.js:75
this.csgo_english = this.objectKeysToLowerCase(vdf.parse(f)['lang']['Tokens']);
^

TypeError: Cannot read properties of undefined (reading 'Tokens')
at GameData.loadFiles (/home/pi/inspect/lib/game_data.js:75:80)
at new GameData (/home/pi/inspect/lib/game_data.js:53:18)
at Object. (/home/pi/inspect/index.js:18:16)
at Module._compile (node:internal/modules/cjs/loader:1504:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1588:10)
at Module.load (node:internal/modules/cjs/loader:1282:32)
at Module._load (node:internal/modules/cjs/loader:1098:12)
at TracingChannel.traceSync (node:diagnostics_channel:315:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:215:24)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:158:5)

Node.js v22.5.1

(the '^' symbol is exactly after ['lang'], on the '[')

Ealier today everything was working just fine so I'm wondering if it is known bug or I messed something up?

Cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions