# dbt deps issue in new initialized vscode env

**URL:** <https://discourse.getdbt.com/t/dbt-deps-issue-in-new-initialized-vscode-env/14135>\
**Category:** Help\
**Tags:** bigquery, dbt-core\
**Created:** [July 8, 2024, 10:46pm UTC](https://discourse.getdbt.com/t/dbt-deps-issue-in-new-initialized-vscode-env/14135 "2024-07-08T22:46:44Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sreenig](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@sreenig](https://discourse.getdbt.com/u/sreenig)\
**Post date:** [July 8, 2024, 10:46pm UTC](https://discourse.getdbt.com/t/dbt-deps-issue-in-new-initialized-vscode-env/14135/1 "2024-07-08T22:46:44Z")

</div>

Initialized dbt in vscode for the first time after testing my bigquery adapter connection. But when I run dbt deps or dbt --no-version-check deps code, I get the following error

**PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: ‘dbt\_packages\dbt\_metrics-1.3.2\integration\_tests’**

Unable to delete the packages folders as suggested by chatgpt. Tried dbt clean command as well. Nothing works.

---

<div class="post-metadata">

**Author:** ![jenna-jordan](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/jenna-jordan/32/4227_2.png) [@jenna-jordan](https://discourse.getdbt.com/u/jenna-jordan)\
**Post date:** [July 9, 2024, 5:51pm UTC](https://discourse.getdbt.com/t/dbt-deps-issue-in-new-initialized-vscode-env/14135/2 "2024-07-09T17:51:25Z")

</div>

Try manually deleting the dbt\_packages folder, quitting VSCode, and then open a separate command line application like GitBash (anything but VSCode), navigate to the root of your dbt project, and run `dbt deps`. Then re-open the dbt project in VSCode.

---

<div class="post-metadata">

**Author:** ![sreenig](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@sreenig](https://discourse.getdbt.com/u/sreenig)\
**Post date:** [July 10, 2024, 5:57pm UTC](https://discourse.getdbt.com/t/dbt-deps-issue-in-new-initialized-vscode-env/14135/3 "2024-07-10T17:57:52Z")

</div>

Thank you. I tried with Process Explorer and that sorted the issue. But getting a different error now.

Encountered an error:  
Parsing Error  
Invalid metrics config given in FilePath(searched\_path=‘models’, relative\_path=‘1-staging\ads\metrics.yml’, modification\_time=1720463882.679679, project\_root=‘rootfolder’) @ metrics: {‘name’: ‘total\_paid\_spend’, ‘label’: ‘Total Paid Spend’, ‘model’: “ref(‘prod\_ads\_timeline’)”, ‘description’: ‘Total paid ad spend’, ‘expression’: ‘spend’, ‘calculation\_method’: ‘sum’, ‘timestamp’: ‘report\_date’, ‘time\_grains’: [‘week’, ‘month’, ‘quarter’, ‘year’], ‘dimensions’: [‘platform’]} - at path : Additional properties are not allowed (‘calculation\_method’, ‘dimensions’, ‘expression’, ‘model’, ‘time\_grains’, ‘timestamp’ were unexpected)

I havent changed anything

---

<div class="post-metadata">

**Author:** ![elinasadiq](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/elinasadiq/32/4244_2.png) [@elinasadiq](https://discourse.getdbt.com/u/elinasadiq)\
**Post date:** [July 12, 2024, 6:49am UTC](https://discourse.getdbt.com/t/dbt-deps-issue-in-new-initialized-vscode-env/14135/4 "2024-07-12T06:49:13Z")

</div>

Hello,  
Thanks for asking this, i am also facing the same problem.

---

<div class="post-metadata">

**Author:** ![thomas.phillips](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/thomas.phillips/32/4989_2.png) [@thomas.phillips](https://discourse.getdbt.com/u/thomas.phillips)\
**Post date:** [February 20, 2025, 2:52pm UTC](https://discourse.getdbt.com/t/dbt-deps-issue-in-new-initialized-vscode-env/14135/5 "2025-02-20T14:52:06Z")

</div>

I have finally tracked down the source of this issue.

The “Power User for dbt” is creating an endless loop of processing dbt deps for packages containing integration\_tests, due to the presence of packages.yml in integration\_tests referencing “local: …/”.

This causes the process to endlessly loop, until it finally fails.

---

<div class="post-metadata">

**Author:** ![lilithabrahamyan](https://avatars.discourse-cdn.com/v4/letter/l/b4bc9f/32.png) [@lilithabrahamyan](https://discourse.getdbt.com/u/lilithabrahamyan)\
**Post date:** [February 20, 2025, 5:37pm UTC](https://discourse.getdbt.com/t/dbt-deps-issue-in-new-initialized-vscode-env/14135/6 "2025-02-20T17:37:23Z")

</div>

I am getting the same issue, how you solved it? We should just disable the extension?

---

<div class="post-metadata">

**Author:** ![thomas.phillips](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/thomas.phillips/32/4989_2.png) [@thomas.phillips](https://discourse.getdbt.com/u/thomas.phillips)\
**Post date:** [February 20, 2025, 6:28pm UTC](https://discourse.getdbt.com/t/dbt-deps-issue-in-new-initialized-vscode-env/14135/7 "2025-02-20T18:28:28Z")

</div>

The only way I have been able to work around the issue is to run “dbt clean” twice to cause the dbt\_packages folder to be deleted.

Then the same issue comes back.
