From 87defc5fcfc38dc9947559565e7cab6505c878e0 Mon Sep 17 00:00:00 2001 From: Yehuda Kremer Date: Tue, 23 Mar 2021 13:52:34 +0200 Subject: [PATCH 1/2] Print error details Hello i got general error message "Error loading image" over and over and I could not know what was causing the error, therefore we should print the error details. in my case the error details was "EPERM: operation not permitted, open...." that happened because I only worked with YARN and to solve this specific problem i had to run once `npm install`. Thank you for this wonderful plugin! --- packages/gatsby-plugin-image/src/node-apis/image-processing.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/gatsby-plugin-image/src/node-apis/image-processing.ts b/packages/gatsby-plugin-image/src/node-apis/image-processing.ts index f9c790b71a114..ab00eb6653862 100644 --- a/packages/gatsby-plugin-image/src/node-apis/image-processing.ts +++ b/packages/gatsby-plugin-image/src/node-apis/image-processing.ts @@ -111,6 +111,7 @@ export async function writeImages({ }) } catch (err) { reporter.error(`Error loading image ${src}`) + reporter.error(err) return } if ( From f6c08e3b2399c1eef7801b2ef07913cf4db1853e Mon Sep 17 00:00:00 2001 From: Lennart Date: Thu, 6 May 2021 11:24:52 +0200 Subject: [PATCH 2/2] Update image-processing.ts --- packages/gatsby-plugin-image/src/node-apis/image-processing.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/gatsby-plugin-image/src/node-apis/image-processing.ts b/packages/gatsby-plugin-image/src/node-apis/image-processing.ts index ab00eb6653862..6758aa54a9ed9 100644 --- a/packages/gatsby-plugin-image/src/node-apis/image-processing.ts +++ b/packages/gatsby-plugin-image/src/node-apis/image-processing.ts @@ -110,8 +110,7 @@ export async function writeImages({ reporter, }) } catch (err) { - reporter.error(`Error loading image ${src}`) - reporter.error(err) + reporter.error(`Error loading image ${src}`, err) return } if (