# "Missing dbt\_project.yml file" error message

**URL:** <https://discourse.getdbt.com/t/missing-dbt-project-yml-file-error-message/394>\
**Category:** Archive\
**Created:** [May 28, 2019, 7:36pm UTC](https://discourse.getdbt.com/t/missing-dbt-project-yml-file-error-message/394 "2019-05-28T19:36:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![imran\_sjrb](https://avatars.discourse-cdn.com/v4/letter/i/34f0e0/32.png) [@imran\_sjrb](https://discourse.getdbt.com/u/imran_sjrb)\
**Post date:** [May 28, 2019, 7:36pm UTC](https://discourse.getdbt.com/t/missing-dbt-project-yml-file-error-message/394/1 "2019-05-28T19:36:59Z")

</div>

I keep getting this error. Can someone help to get the correct directory structure setup.

Encountered an error:  
Runtime Error  
fatal: Not a dbt project (or any of the parent directories). Missing dbt\_project.yml file

---

<div class="post-metadata">

**Author:** ![amy](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/amy/32/446_2.png) [@amy](https://discourse.getdbt.com/u/amy)\
**Post date:** [May 28, 2019, 9:05pm UTC](https://discourse.getdbt.com/t/missing-dbt-project-yml-file-error-message/394/2 "2019-05-28T21:05:36Z")

</div>

Hello @imran_sjrb,

have you set up your dbt\_project.yml file?

These links might be helpful to you:

[Creating a Project](https://docs.getdbt.com/docs/creating-a-project)  
[setting up a dbt\_project.yml file](https://docs.getdbt.com/docs/configure-your-profile)

---

<div class="post-metadata">

**Author:** ![imran\_sjrb](https://avatars.discourse-cdn.com/v4/letter/i/34f0e0/32.png) [@imran\_sjrb](https://discourse.getdbt.com/u/imran_sjrb)\
**Post date:** [May 28, 2019, 9:10pm UTC](https://discourse.getdbt.com/t/missing-dbt-project-yml-file-error-message/394/3 "2019-05-28T21:10:15Z")

</div>

I have the file created but i think i have the directory structure incorrect.Could you provide a sample directory structure of where the .dbt folder should be created.

---

<div class="post-metadata">

**Author:** ![claire](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/claire/32/522_2.png) [@claire](https://discourse.getdbt.com/u/claire)\
**Post date:** [May 28, 2019, 9:25pm UTC](https://discourse.getdbt.com/t/missing-dbt-project-yml-file-error-message/394/6 "2019-05-28T21:25:20Z")

</div>

Hi @imran_sjrb 👋

This error occurs when you try to run a dbt command from your terminal, but you’re not “in” a dbt project. This might happen for one of two reasons:

1. Your dbt project isn’t set up correctly, or
2. The working directory of your terminal is not “in” your dbt project.

**1. Your dbt project isn’t set up correctly**  
By definition, a dbt project is a directory that contains a `dbt_project.yml` file, and `sql` files. Most users use the `dbt init` command to create their project (more [here](https://docs.getdbt.com/docs/creating-a-project)) to make sure they get this structure right. You can also see a sample project [here](https://github.com/fishtown-analytics/jaffle_shop), but I’d strongly recommend using the `init` command to get started rather than starting from scratch.

**2. The working directory of your terminal is not “in” your dbt project.**  
If you’ve set up your dbt project correctly, but you’re getting this error, it may be that your terminal isn’t in the right directory! From your terminal, try running `pwd` (print working directory) – this will return your current directory. If the path it gives back _isn’t_ where your project is located, use `cd` (change directory) to navigate to it.

If this was the case, I strongly recommend taking the time to learn the basics of working in your terminal – this will make using dbt feel easier, and is generally a great skill to have up your sleeve! There are lots of great tutorials on the internet for this, we often [use this one](https://www.codecademy.com/learn/learn-the-command-line) to get our new analysts started.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/getdbt/original/1X/a7a7ca1fe379aaf90952b0e13118a817babcd14f.png) [@system](https://discourse.getdbt.com/u/system)\
**Post date:** [September 23, 2022, 4:20am UTC](https://discourse.getdbt.com/t/missing-dbt-project-yml-file-error-message/394/8 "2022-09-23T04:20:59Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
