Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

YAML ParseError #187

Open
GR-Dinesh opened this issue Jan 10, 2025 · 8 comments
Open

YAML ParseError #187

GR-Dinesh opened this issue Jan 10, 2025 · 8 comments
Labels
config config issue not related to app functionality

Comments

@GR-Dinesh
Copy link

When I try to npm run start I'm getting the below error

texas-dps-scheduler@5.0.2 start
ts-node --transpile-only src/index.ts

/workspaces/texas-dps-scheduler/node_modules/yaml/dist/compose/composer.js:70
this.errors.push(new errors.YAMLParseError(pos, code, message));
^
YAMLParseError: All mapping items must start at the same column at line 44, column 1:

# If the date input is invalid or in the past, the app will automatically u…

startDate: 01/10/2024
^

at Composer.onError (/workspaces/texas-dps-scheduler/node_modules/yaml/dist/compose/composer.js:70:34)
at Object.resolveBlockMap (/workspaces/texas-dps-scheduler/node_modules/yaml/dist/compose/resolve-block-map.js:35:21)
at resolveCollection (/workspaces/texas-dps-scheduler/node_modules/yaml/dist/compose/compose-collection.js:13:27)
at Object.composeCollection (/workspaces/texas-dps-scheduler/node_modules/yaml/dist/compose/compose-collection.js:59:16)
at composeNode (/workspaces/texas-dps-scheduler/node_modules/yaml/dist/compose/compose-node.js:33:38)
at Object.resolveBlockMap (/workspaces/texas-dps-scheduler/node_modules/yaml/dist/compose/resolve-block-map.js:85:19)
at resolveCollection (/workspaces/texas-dps-scheduler/node_modules/yaml/dist/compose/compose-collection.js:13:27)
at Object.composeCollection (/workspaces/texas-dps-scheduler/node_modules/yaml/dist/compose/compose-collection.js:59:16)
at Object.composeNode (/workspaces/texas-dps-scheduler/node_modules/yaml/dist/compose/compose-node.js:33:38)
at Object.composeDoc (/workspaces/texas-dps-scheduler/node_modules/yaml/dist/compose/compose-doc.js:35:23) {

code: 'BAD_INDENT',
pos: [ 2030, 2031 ],
linePos: [ { line: 44, col: 1 }, { line: 44, col: 2 } ]
}

@phamleduy04 phamleduy04 added the config config issue not related to app functionality label Jan 10, 2025
@phamleduy04
Copy link
Owner

your config file is wrong, you can try again by delete your old config and edit it again.

@GR-Dinesh
Copy link
Author

Thank you. What is the changes that I need to do on that config file?

Is this the error from node.js install? Can I re-install the node.js?

What would you need from me?

@GR-Dinesh
Copy link
Author

Are you referring to 'config.yml' file?

@phamleduy04
Copy link
Owner

Yes it is the config.yml file. You might mess up the structure of the file. So the best way in my opinion is just delete the config file and use the example config to do it again

@GR-Dinesh
Copy link
Author

Yes it is the config.yml file. You might mess up the structure of the file. So the best way in my opinion is just delete the config file and use the example config to do it again

Thank you very much, I really appreciate it

@GR-Dinesh
Copy link
Author

I got this error now. I used the Dev tools -> Network to get the APIKey and replaced it in authToken

01/11/2025 12:08:27] ERROR: Config file is not valid
ZodError: [
{
"received": "",
"code": "invalid_enum_value",
"options": [
"2captcha",
"capsolver"
],
"path": [
"appSettings",
"captcha",
"solverOptions",
"solverService"
],
"message": "Invalid enum value. Expected '2captcha' | 'capsolver', received ''"
}
]
at Object.get error [as error] (/workspaces/texas-dps-scheduler/node_modules/zod/lib/types.js:55:31)
at ZodObject.parse (/workspaces/texas-dps-scheduler/node_modules/zod/lib/types.js:131:22)
at parseConfig (/workspaces/texas-dps-scheduler/src/Config/index.ts:28:26)
at Object. (/workspaces/texas-dps-scheduler/src/CaptchaSolver/index.ts:8:27)
at Module._compile (node:internal/modules/cjs/loader:1469:14)
at Module.m._compile (/workspaces/texas-dps-scheduler/node_modules/ts-node/src/index.ts:1618:23)
at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
at Object.require.extensions. [as .ts] (/workspaces/texas-dps-scheduler/node_modules/ts-node/src/index.ts:1621:12)
at Module.load (node:internal/modules/cjs/loader:1288:32)
at Function.Module._load (node:internal/modules/cjs/loader:1104:12) {
issues: [
{
received: '',
code: 'invalid_enum_value',
options: [Array],
path: [Array],
message: "Invalid enum value. Expected '2captcha' | 'capsolver', received ''"
}
],
addIssue: [Function (anonymous)],
addIssues: [Function (anonymous)],
errors: [
{
received: '',
code: 'invalid_enum_value',
options: [Array],
path: [Array],
message: "Invalid enum value. Expected '2captcha' | 'capsolver', received ''"
}
]
}

@phamleduy04
Copy link
Owner

i just pushed new version with some changes. try delete the codespace and create a new one. Updated guide here

https://github.com/phamleduy04/texas-dps-scheduler/wiki/Captcha-(Auth-Token)

@GR-Dinesh
Copy link
Author

i just pushed new version with some changes. try delete the codespace and create a new one. Updated guide here

https://github.com/phamleduy04/texas-dps-scheduler/wiki/Captcha-(Auth-Token)

Thank you sir, I'll check this

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
config config issue not related to app functionality
Projects
None yet
Development

No branches or pull requests

2 participants