YAML error: line 83: could not find expected ':'
When trying to run theme "watch, download, replace" --- Not sure why i am getting this error. I ran my config file through lint, to check for artifacts or spaces. Also used an example config.yml from a colleague on the same project.
Mac OS Sierra: 10.12.6
Themekit version: 0.7.5 darwin/amd64
ignore_files:
- config/settings_data.json
- assets/app/
- config.yml
- Gruntfile.js
- package.json
- README.md
- .gitignore
It seems like you have invalid YAML 🤷🏼♂️. I would first recommend using the --config flag to indicate specifically which config file you are using just in case there is any confusion. Then have your colleague send the file to you and try again.
Barring that, feel free to send me your config file to tim.[email protected] and I will take a look.
@bhekuwenza I had the same error and found the problem was in my theme.lock file. Check like 83 of your theme.lock file for anything out of the ordinary.
@nmoore2 Thanks for your insight, that is really bizaare because that file is programatically generatated. It should always be valid @bhekuwenza if you do find a problem with the lock file please paste the problematic line here so I can make sure this doesn't happen again.
@tanema Thanks for your reply. I think I may have my theme.lock setup with git incorrectly. Whenever I merge branches I get conflicts in my theme.lock which I have to resolve. I think a bad merge is what caused the error for me. I know this file isn't supposed to be edited directly so something is probably not setup right. Should the theme.lock be included in the .gitignore? I thought the documentation said it should be checked into git, so there's probably something I'm not doing correctly.
@nmoore2 @tanema
Hey hey, thank you for the info on this! I can confirm that it was the .lock file. We deleted it and the tracking of files in the theme folder reset. To your query nmoore2, placing the file in .gitignore stopped shopifys tracking of the files. The theme update/replace etc still worked but I am also curious about the proper way of handling this if there are multiple devs working on the theme.
But again, like you, I could be doing it wrong in my set up too.
thanks again
It looks to me like this might still be an issue, even after #497. But deleting the theme.lock file does fix the issue. Unfortunately I don't have any useful info to add just yet.
I don't have the exact cause of this specific error, but it seems to happen when switching branches in git.
either way, it would be great to get a better error message!!
Most helpful comment
@bhekuwenza I had the same error and found the problem was in my theme.lock file. Check like 83 of your theme.lock file for anything out of the ordinary.