Skip to content
This repository was archived by the owner on Oct 7, 2024. It is now read-only.

Error migrating application with multiple database.js files using env folder #49

@vstollen

Description

@vstollen

While migrating my application I got the error:

error: Cannot find module '/[...]/strapi-project/config/database.js'
Require stack:
- /home/<user>/.npm/_npx/636cd3a3cca06392/node_modules/@strapi/codemods/lib/v4/migration-helpers/update-application-folder-structure.js
- /home/<user>/.npm/_npx/636cd3a3cca06392/node_modules/@strapi/codemods/lib/v4/migration-helpers/index.js
- /home/<user>/.npm/_npx/636cd3a3cca06392/node_modules/@strapi/codemods/lib/v4/index.js
- /home/<user>/.npm/_npx/636cd3a3cca06392/node_modules/@strapi/codemods/lib/index.js
- /home/<user>/.npm/_npx/636cd3a3cca06392/node_modules/@strapi/codemods/bin/commands/migrate.js
- /home/<user>/.npm/_npx/636cd3a3cca06392/node_modules/@strapi/codemods/bin/commands/default-commands.js
- /home/<user>/.npm/_npx/636cd3a3cca06392/node_modules/@strapi/codemods/bin/cli.js

I do not have a config/database.js, because I use environments using the env folder: https://docs-v3.strapi.io/developer-docs/latest/setup-deployment-guides/configurations.html#formats

It would be nice, if codemods supported this case gracefully.

Tested using @strapi/codemods@1.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions