File tree Expand file tree Collapse file tree 2 files changed +21
-10
lines changed Expand file tree Collapse file tree 2 files changed +21
-10
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " open-next " : patch
3
+ ---
4
+
5
+ Display sharp installation log on failure
Original file line number Diff line number Diff line change @@ -352,17 +352,23 @@ function createImageOptimizationBundle() {
352
352
const sharpVersion = process . env . SHARP_VERSION ?? "0.32.5" ;
353
353
354
354
//check if we are running in Windows environment then set env variables accordingly.
355
- cp . execSync (
356
- `npm install --arch=arm64 --platform=linux --target=18 --libc=glibc --prefix="${ nodeOutputPath } " sharp@${ sharpVersion } ` ,
357
- {
358
- stdio : "inherit" ,
359
- cwd : appPath ,
360
- env : {
361
- ...process . env ,
362
- SHARP_IGNORE_GLOBAL_LIBVIPS : "1" ,
355
+ try {
356
+ cp . execSync (
357
+ `npm install --arch=arm64 --platform=linux --target=18 --libc=glibc --prefix="${ nodeOutputPath } " sharp@${ sharpVersion } ` ,
358
+ {
359
+ stdio : "pipe" ,
360
+ cwd : appPath ,
361
+ env : {
362
+ ...process . env ,
363
+ SHARP_IGNORE_GLOBAL_LIBVIPS : "1" ,
364
+ } ,
363
365
} ,
364
- } ,
365
- ) ;
366
+ ) ;
367
+ } catch ( e : any ) {
368
+ logger . error ( e . stdout . toString ( ) ) ;
369
+ logger . error ( e . stderr . toString ( ) ) ;
370
+ logger . error ( "Failed to install sharp." ) ;
371
+ }
366
372
}
367
373
368
374
function createStaticAssets ( ) {
You can’t perform that action at this time.
0 commit comments