Skip to content

yarn develop -> Cannot destructure property 'client' of 'db.config.connection' as it is undefined #18920

@vitakili

Description

@vitakili

Full error log even after --debug is ->
│ TypeError: Cannot destructure property 'client' of 'db.config.connection' as it is undefined. │
│ at getDialect (D:\nextjs_strapi\vita-multilang\portfolio-backend\node_modules@strapi\database\dist\index.js:1014:11) │
│ at new Database (D:\nextjs_strapi\vita-multilang\portfolio-backend\node_modules@strapi\database\dist\index.js:6114:20) │
│ at Database.init (D:\nextjs_strapi\vita-multilang\portfolio-backend\node_modules@strapi\database\dist\index.js:6100:16) │
│ at Strapi.bootstrap (D:\nextjs_strapi\vita-multilang\portfolio-backend\node_modules@strapi\strapi\dist\Strapi.js:365:39) │
│ at Strapi.load (D:\nextjs_strapi\vita-multilang\portfolio-backend\node_modules@strapi\strapi\dist\Strapi.js:419:16) │
│ at async Object.develop (D:\nextjs_strapi\vita-multilang\portfolio-backend\node_modules@strapi\admin\dist_chunks\index-cce8ecb6.js:1160:28) │
│ at async develop (D:\nextjs_strapi\vita-multilang\portfolio-backend\node_modules@strapi\admin\dist_chunks\develop-69e28e61.js:52:5) │
│ at async Command.parseAsync (D:\nextjs_strapi\vita-multilang\portfolio-backend\node_modules\commander\lib\command.js:923:5) │
│ at async Module.runStrapiCommand (D:\nextjs_strapi\vita-multilang\portfolio-backend\node_modules@strapi\strapi\dist\commands\index.js:124:3)
-->

Bug report

  • Node.js version: v18.18.2
  • Yarn version: 1.22.19
  • Strapi version:4.13.6/4.15.4 (doesn't matter -> both same error)
  • Database: postgres
  • Operating system: win32-x64
  • Is your project Javascript or Typescript: ts

Steps to reproduce the behavior

  1. type yarn build && yarn develop
  2. look at error
  3. 8 times delete node_modules and change versions of Strapi
  4. See error again

Expected behavior

Development server -> localhost:1337

Metadata

Metadata

Assignees

No one assigned

    Labels

    flag: questionAutomation Flag to handle community questions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions