Trying to deploy app components via app platform and getting this error after the build succeeds.
failed to export: failed to write image to the following tags: [<image-4>: head <registry-uri-5> unexpected status code 401 unauthorized (head responses have no body, use get for details)
This same exact codebase, different branch, is running with no issues in another App platform deployment. More logs:
Oct 27 20:06:39 [34m│[0m -----> Build succeeded!
Oct 27 20:06:40 [34m│[0m Running custom build command: npm run build
Oct 27 20:06:40 [34m│[0m
Oct 27 20:06:40 [34m│[0m > backend@1.0.0 build
Oct 27 20:06:40 [34m│[0m > tsc
Oct 27 20:06:40 [34m│[0m
Oct 27 20:06:46 [34m│[0m npm notice
Oct 27 20:06:46 [34m│[0m npm notice New major version of npm available! 10.9.2 -> 11.6.2
Oct 27 20:06:46 [34m│[0m npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.6.2
Oct 27 20:06:46 [34m│[0m npm notice To update run: npm install -g npm@11.6.2
Oct 27 20:06:46 [34m│[0m npm notice
Oct 27 20:06:46 [34m│[0m Timer: Builder ran for 25.300368088s and ended at 2025-10-27T20:06:46Z
Oct 27 20:06:46 [34m╰───────────────────────────────────╼[0m
Oct 27 20:06:46
Oct 27 20:06:46 [34m╭────────────[34m[30m[44m app upload [0m[0m[34m───────────╼[0m
Oct 27 20:06:46 [34m│[0m [34m › uploading app container image to DOCR[0m
Oct 27 20:06:46 [34m│[0m [33;1mWarning: [0mno analyzed metadata found at path ‘/layers/analyzed.toml’
Oct 27 20:06:46 [34m│[0m Timer: Exporter started at 2025-10-27T20:06:46Z
Oct 27 20:06:46 [34m│[0m Adding layer ‘heroku/nodejs:profile’
Oct 27 20:06:57 [34m│[0m Adding 1/1 app layer(s)
Oct 27 20:06:57 [34m│[0m Adding layer ‘buildpacksio/lifecycle:launcher’
Oct 27 20:06:57 [34m│[0m Adding layer ‘buildpacksio/lifecycle:config’
Oct 27 20:06:57 [34m│[0m Adding layer ‘buildpacksio/lifecycle:process-types’
Oct 27 20:06:57 [34m│[0m Adding label ‘io.buildpacks.lifecycle.metadata’
Oct 27 20:06:57 [34m│[0m Adding label ‘io.buildpacks.build.metadata’
Oct 27 20:06:57 [34m│[0m Adding label ‘io.buildpacks.project.metadata’
Oct 27 20:06:57 [34m│[0m Setting default process type ‘web’
Oct 27 20:06:57 [34m│[0m Timer: Saving <image-0>… started at 2025-10-27T20:06:57Z
Oct 27 20:06:57 [34m│[0m *** Images (sha256:ec37cb06900b1f3ac54a9e084a798c2c72f4d9004694a23e4e499dc7c86d2f66):
Oct 27 20:06:57 [34m│[0m <image-1> - HEAD <registry-uri-3> unexpected status code 401 Unauthorized (HEAD responses have no body, use GET for details)
Oct 27 20:06:57 [34m│[0m Timer: Saving <image-2>… ran for 60.920831ms and ended at 2025-10-27T20:06:57Z
Oct 27 20:06:57 [34m│[0m Timer: Exporter ran for 10.922091465s and ended at 2025-10-27T20:06:57Z
Oct 27 20:06:57 [34m│[0m [31;1mERROR: [0mfailed to export: failed to write image to the following tags: [<image-4>: HEAD <registry-uri-5> unexpected status code 401 Unauthorized (HEAD responses have no body, use GET for details)]
Oct 27 20:06:57 [34m│[0m
Oct 27 20:06:57 [34m│[0m command exited with code 246
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hey,
Are you still seeing this issue? I think it might have been related to this incident here:
If you are still seeing the issue, it’s probably best to reach out to the DigitalOcean support team, who will be more than happy to assist you further:
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.