First deployment fails while build is successful


In my company we’re looking for a solution to replace Prismic so we give a try for Strapi but the first experience is very frustrating. I installed a project locally and spent the whole day editing collections types and content types of all kinds. I managed to build a complex content type as we have currently in Prismic but when I push the project on the Cloud it fails to deploy.

Here is the error message:

[2023-12-13 16:33:25] [2023-12-13 16:33:25.182] error: create index "components_endpoint_parameters_body_parameters_parameters_links_fk" on "public"."components_endpoint_parameters_body_parameters_parameters_links" ("body_parameters_id") - relation "components_endpoint_parameters_body_parameters_parameters_links" already exists
[2023-12-13 16:33:25] error: create index "components_endpoint_parameters_body_parameters_parameters_links_fk" on "public"."components_endpoint_parameters_body_parameters_parameters_links" ("body_parameters_id") - relation "components_endpoint_parameters_body_parameters_parameters_links" already exists
[2023-12-13 16:33:25]     at Parser.parseErrorMessage (/home/app/node_modules/pg-protocol/dist/parser.js:287:98)
[2023-12-13 16:33:25]     at Parser.handlePacket (/home/app/node_modules/pg-protocol/dist/parser.js:126:29)
[2023-12-13 16:33:25]     at Parser.parse (/home/app/node_modules/pg-protocol/dist/parser.js:39:38)
[2023-12-13 16:33:25]     at TLSSocket.<anonymous> (/home/app/node_modules/pg-protocol/dist/index.js:11:42)
[2023-12-13 16:33:25]     at TLSSocket.emit (node:events:517:28)
[2023-12-13 16:33:25]     at TLSSocket.emit (node:domain:489:12)
[2023-12-13 16:33:25]     at addChunk (node:internal/streams/readable:335:12)
[2023-12-13 16:33:25]     at readableAddChunk (node:internal/streams/readable:308:9)
[2023-12-13 16:33:25]     at Readable.push (node:internal/streams/readable:245:10)
[2023-12-13 16:33:25]     at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23)

Can you help me to understand what’s wrong?

Best regards,

David B.

I finally found the answer here Create index already exists. It’s a Postgres index name length issue. Postgres index name is limited to 63 characters. Consequently we need to shorten the content types names for the deployment to work. Amazing! :frowning:

Sorry for your initial frustration. Glad you were able to figure it out. Thank you for your feedback. I will mention it to our team, and for the time we can add a callout it the docs.

This is something that will be fixed with v5.