Runtime Error | Failed to read package: | No dbt_project.yml found at expected path

After upgrading to dbt v1.4, in our development environment, we’re no getting this error:

Runtime Error
Failed to read package: Runtime Error
No dbt_project.yml found at expected path /usr/src/develop/user-16855/environment-27304/repository-28692/dbt_packages/dbt_expectations/dbt_project.yml
Verify that each entry within packages.yml (and their transitive dependencies) contains a file named dbt_project.yml

Error encountered in /usr/src/develop/user-16855/environment-27304/repository-28692/dbt_packages/dbt_expectations

I tried resetting the version range for the calogica/dbt_expectations package to what’s working in our other projects, but the error persists.

This error is preventing any development in the project.

Here’s our dbt_project.yml file:

name: 'rocket_finance'
version: 0.1.0

require-dbt-version: [">=1.3.0", "<2.0.0"]
config-version: 2
# Configure database connection profile for dbt to use
profile: 'rocket_software_finance'
# Set paths for dbt objects
analysis-paths: ["analysis"]
asset-paths: ["docs/assets"]
seed-paths: ["data"]
macro-paths: ["macros"]
snapshot-paths: ["snapshots"]
model-paths: ["models"]
test-paths: ["tests"]
log-path: "logs"
#modules-path: "dbt_modules"
target-path: "target"
clean-targets:
  - "dbt_packages"
  - "target"


# Set query behavior: prepend comments and quoting
query-comment: "{{ query_comment(node) }}"
quoting:
  database: false
  schema: false
  identifier: false

# Run Hooks
on-run-start:
  - "{{ resume_warehouse(var('resume_warehouse', false), var('warehouse_name', target.warehouse)) }}"
on-run-end:
  - "{{ record_run_results(results) }}"
  - "{{ suspend_warehouse(var('suspend_warehouse', false), var('warehouse_name', target.warehouse)) }}"

# Create scoped variables
vars:
  source_database: 'rs_finance'

  dbt_project_created_date: '2021-03-02'  # Set as date when dbt project first created
  analysis_start_date: '2020-03-02'  # Based on start of data tracking
  analysis_end_date: dbt_utils.current_timestamp()

  fivetran_log:
    fivetran_log_database: rs_finance
  finance_ibm_source:
    finance_ibm_database: rs_finance
 

# DBT MODELS
models:
  rocket_finance:
    +enabled: true
    +materialized: view
    +persist_docs:
      relation: true
      columns: true
    
    staging:
      +enabled: true 
      +materialized: view
      workday:
        +enabled: false
        +schema: staging_workday
        +tags:
          - "daily"
          - "contains_pii"
          - "development"

      ibm_finance:
        +enabled: false
        +schema: staging_ibmfinance
        +tags: 
          - "prelims"
          - "finance"

      marketo:
        +enabled: false
        +schema: staging_marketo
        +tags:
          - "marketo"
          - "marketing"
      
      oracle:
        +enabled: false
        +schema: staging_oracle

      pimcore:
        +enabled: true
        +schema: staging_pimcore
        +tags:
          - "pimcore"
          - "product"

      pipedrive:
        +enabled: false
        +schema: staging_pipedrive
        +tags:
          - "pipedrive"

      planful:
        +enabled: true
        +schema: staging_planful
        +tags:
          - "planful"
          - "gl"
      
      rocket_jira:
        +enabled: false
        +schema: staging_rocket_jira
        +tags:
          - "jira"
          - "devops"

      salesforce:
        +enabled: true
        +schema: staging_salesforce
        +tags:
          - "salesforce"

      fivetran_log:
        +enabled: false
        +schema: metadata

    semantic:
      +enabled: true
      +materialized: table

      core:
        +enabled: true
        +schema: core

      bu_metrics:
        +enabled: true
        +schema: bu_metrics
        +tags:
          - "planful"
          - "gl"
      
      ibm_prelims_royalty:
        +enabled: false
        +schema: ibm_prelims_royalty


      customer_success:
        +enabled: false
        +schema: customer_success

      marketing:
        +enabled: false
        +schema: marketing

      sales:
        +enabled: false
        +schema: sales


# Define dbt data seeds
seeds:
  +quote_columns: false
  +schema: core
  rocket:
    +enabled: true

Here’s our packages.yml file:

packages:
  # - git: "https://github.com/fivetran/dbt_fivetran_utils.git"
  #   revision: "main"
  - package: dbt-labs/dbt_utils
    version: [">=1.0.0", "<2.0.0"]
  #- package: fivetran/fivetran_utils
  #  version: 0.3.1
  - package: dbt-labs/codegen
    version: [">=0.5.0", "<1.0.0"]
  # - package: Montreal-Analytics/snowflake_utils
  #   version: 0.3.0
  - package: calogica/dbt_expectations
    version: [">=0.5.0", "<1.0.0"]
  - package: dbt-labs/dbt_external_tables
    version: [">=0.8.0", "<1.0.0"]
  # Data Packages
  - package: fivetran/fivetran_log
    version: [">=0.5.4", "<1.0.0"]
  #- package: fivetran/marketo_source
  #  version: 0.7.0
  #- package: fivetran/marketo
  #  version: 0.7.0
  #- package: gitlabhq/snowflake_spend
  #  version: 1.2.0
  # - git: "https://gitlab.com/gitlab-data/snowflake_spend.git"
  #   revision: 6f45b467c478df1c67d19cf6d4cbb8e05a710662
  - package: dbt-labs/spark_utils
    version: [">=0.3.0", "<1.0.0"]

We were able to fix this problem by checking out the project’s master branch, and running dbt deps. Apparently, this has to be done for each user in the system.

1 Like

Just so anyone else has not resolved by the earlier solution, check if your terminal is on the correct working directory. You should be able to run vi dbt_project.yml without problems if the path is right.

Thank you for this answer. I had the same issue and running “dbt deps” fixed it.