3

Deploy Strapi on Digital Ocean APP error

 2 years ago
source link: https://dev.to/mastermindlegion/deploy-strapi-on-digital-ocean-app-error-4o4i
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

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] > [email protected] 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.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK