cancel
Showing results for 
Search instead for 
Did you mean: 

Error message "No space left on device" during build of CAP application

gregorw
Active Contributor
2,146

Hi mikkel.jensen,

can you please provide the solution for this issue:

   2024-01-04T08:27:26.21+0100 [STG/0] OUT service is not configured to run with Sealights
   2024-01-04T08:28:51.23+0100 [STG/0] ERR Failed to compress build artifacts:
   2024-01-04T08:28:51.23+0100 [STG/0] ERR gzip: stdout: No space left on device
   2024-01-04T08:28:51.23+0100 [STG/0] ERR /usr/bin/tar: /tmp/output-cache: Cannot write: Broken pipe
   2024-01-04T08:28:51.23+0100 [STG/0] ERR /usr/bin/tar: Child returned status 1
   2024-01-04T08:28:51.23+0100 [STG/0] ERR /usr/bin/tar: Error is not recoverable: exiting now
   2024-01-04T08:28:51.23+0100 [STG/0] ERR : exit status 2
   2024-01-04T08:28:51.23+0100 [STG/0] OUT Exit status 1

Best Regards
Gregor

View Entire Topic
Mikkelj
Explorer

Hi gregor.wolf,

Ofcourse i will, but first i'd like to share a few details about this issue.

As many might know, this error (one that looks like it) comes up when there is not enough disk space assigned to application. In this case it's a bit different, because it's happening during the build/staging and the reason for this error, is because it excedes the max size (1.5GB) during build. The actual application is no where near 1.5GB, but because of a caching issue in some NPM versions, the application excedes the max size.

To solve this, add following to applications environment variables.
npm_config_cache: .npmcache
npm_config_prefer_offline:true

Hope this can help someone else 🙂

/Mikkel

Thanks to Radoslav Tomov for providing this solution in our Ticket.

Interloper
Explorer
0 Kudos

Had this four days ago, thanks much.

purplepinguin
Explorer

Amazing! We had this issue for a long time, but this finally solved our hacky workaround. Even a support ticket was filed and it wasn't figured out.

What I did, is add these properties to the specific modules that failed inside mta.yaml file:

 properties:
      npm_config_cache: .npmcache
      npm_config_prefer_offline: true
alexander_rau
Product and Topic Expert
Product and Topic Expert
0 Kudos
here's the SAP note for reference: https://me.sap.com/notes/0003419048