How to resolve 'yaml: found character that cannot start any token'
Uzoma Nwanne

Uzoma Nwanne @uzomanwanne

About: I am a web developer with interest in the MERN technology stack. Prior to migrating to the MERN stack, I had over six years of experience developing applications using PHP and Java.

Location:
Calabar, Nigeia
Joined:
Oct 7, 2022

How to resolve 'yaml: found character that cannot start any token'

Publish Date: Oct 25 '24
1 0

Image description
Today, I was trying to run serverless, an npm package that allows us to run AWS serverless function on our local machine. After setting it up and executing the command, it started successfully but ended up showing the error message 'yaml: found character that cannot start any token'.
I did a lot of things to resolve this issue. However, all was to no avail until I had a look at the .yml file associated with serverless. The file was serverless.yml in my case.

SOLUTION

I now had to remove all the indentations to be sure they were not indentated using tabs and this fixed the issue in my case.
In case, you see this error, checking the .yml file and ensuring the indentation is done using space characters might be the fix you are looking for.

Happy coding.

Comments 0 total

    Add comment