DEV Community

MasterMindLegion
MasterMindLegion

Posted on

Deploy Strapi on Digital Ocean APP error

Greetings Guys,

I have a problem regarding Strapi deployment to Digital Ocean using „new“ APP approach. I have followed an official tutorial from Strapi developers here.
I have fulfilled the described steps and I’m having this issue during build time:

Error: Could not load js config file /workspace/config/env/production/database.js: Cannot read properties of undefined (reading 'charAt')

Full log:

[2022-01-10 16:40:14] > backend@0.1.0 build
[2022-01-10 16:40:14] > strapi build
[2022-01-10 16:40:14]
[2022-01-10 16:40:17] Error: Could not load js config file /workspace/config/env/production/database.js: Cannot read properties of undefined (reading 'charAt')
[2022-01-10 16:40:17] at loadJsFile (/workspace/node_modules/@strapi/strapi/lib/core/app-configuration/load-config-file.js:18:11)
[2022-01-10 16:40:17] at loadFile (/workspace/node_modules/@strapi/strapi/lib/core/app-configuration/load-config-file.js:35:14)
[2022-01-10 16:40:17] at /workspace/node_modules/@strapi/strapi/lib/core/app-configuration/config-loader.js:16:18
[2022-01-10 16:40:17] at Array.reduce (<anonymous>)
[2022-01-10 16:40:17] at module.exports (/workspace/node_modules/@strapi/strapi/lib/core/app-configuration/config-loader.js:13:6)
[2022-01-10 16:40:17] at module.exports (/workspace/node_modules/@strapi/strapi/lib/core/app-configuration/index.js:56:21)
[2022-01-10 16:40:17] at new Strapi (/workspace/node_modules/@strapi/strapi/lib/Strapi.js:54:23)
[2022-01-10 16:40:17] at module.exports (/workspace/node_modules/@strapi/strapi/lib/Strapi.js:492:18)
[2022-01-10 16:40:17] at module.exports (/workspace/node_modules/@strapi/strapi/lib/commands/build.js:18:26)
[2022-01-10 16:40:17] at /workspace/node_modules/@strapi/strapi/bin/strapi.js:52:14
[2022-01-10 16:40:17] at processTicksAndRejections (node:internal/process/task_queues:96:5)
[2022-01-10 16:40:17] building: exit status 1
[2022-01-10 16:40:17] ERROR: failed to build: exit status 1
[2022-01-10 16:40:48]
[2022-01-10 16:40:48] For documentation on the buildpacks used to build your app, please see:
[2022-01-10 16:40:48] Node.js: https://do.co/apps-buildpack-node
[2022-01-10 16:40:48]
[2022-01-10 16:40:48] ! Build failed

Please Help.

Top comments (1)

Collapse
 
highcenburg profile image
Vicente G. Reyes

You might wanna check this line out

[2022-01-10 16:40:17] Error: Could not load js config file /workspace/config/env/production/database.js: Cannot read properties of undefined (reading 'charAt')