menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

Gitpod

Gitpod - one-click online IDE for GitHub

Channels
Team

.gitpod.yml not detected

December 5, 2019 at 11:05am

.gitpod.yml not detected

December 5, 2019 at 11:05am
Hi, I created a .gitpod.yml file a while ago referencing a dockerfile which Gitpod build when I opened the workspace, but recently it has stopped detecting the .gitpod.yml. What is going on? It definitely exists in my repository.

December 5, 2019 at 11:11am
Hi ! Usually when this happens, it's either:
  • a typo in the file name (e.g. gitpod.yml instead of .gitpod.yml, or .gitpod.dockerfile instead of .gitpod.Dockerfile)
  • a syntax error in the YAML config (e.g. indentation problem, or a typo in some option name, or an unsupported key, etc)
If you can share your repository URL here, I can help you figure this out. (If it's private, you can also take a workspace snapshot by clicking on the top-right avatar, and share that snapshot with me privately via DM)
Edited
Pretty certain it's not a syntax issue. I'll send a link to the workspace.
Well received, thanks!
When I opened the snapshot, I also noticed that Gitpod did not pick up the .gitpod.yml file. Then I opened the browser devtools (I right-clicked the right vertical bar and clicked "Inspect Element" then switched to Console), and saw this error in the Console:
Unparsable Gitpod configuration name: "YAMLException" message: "duplicated mapping key at line 7, column 5:\n command: php artisan serve\n"
Indeed, looking into the .gitpod.yml, I see this task definition:
tasks:
- init: composer install && npm install
command: npm run dev
command: php artisan serve
This doesn't work, because each task (i.e. each - entry) can have maximum one init step and one command step. Here, there are two command steps for one task, which causes this error.
I think you want to run both commands in parallel to each other, so you'll need to add a second task (i.e. a second Terminal), like so:
tasks:
- init: npm install
command: npm run dev
- init: composer install
command: php artisan serve
You can even get split Terminals by adding openMode: split-right to one of the tasks:
- init: ...
command: ...
openMode: split-right
Edited
This should definitely result in a diagnostic in the editor.
Also, maybe we could make .gitpod.yml errors less secret/hidden/silent? (Even when you don't open the file.)
It would be cool if Gitpod showed an error notification if it detects a .gitpod.yml but there is a YAMLException in it, that way it's less mysterious why a .gitpod.yml doesn't seem to have any effect
like-fill
2

June 8, 2020 at 4:06am
but is there a way two start two terminals after one init command like this
- init: yarn install
command: yarn workspace backend strapi develop
command: yarn workspace frontend serve
I was searching for the answer and thought this was the place to ask, thank you
Edited