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.
Top comments (0)