Deploy failed due to an error in plugin

Waiting on a website to be built and keep getting this “Deploy failed due to an error in netlify-plugin-image-optim plugin.”

Strangely is that it only happens on this specific website and not on the others I have active.
I tried enabling/disableing Assets Optimisation thinking that then the plugin won’t run.

Thank you so much!

Hey there, @anodpixels :wave:

Welcome to the Netlify Forums! We will need a bit mire information in order to look into this further for you. Which site is this regarding? Additionally, can you share your project repo? Lastly, please share your most recent deploy log from that site.

Thanks!

Hi there Hillary! Thank you for reaching out on this thing.
The website name is “anodpixels.com” but the repo is private on Github, I can add you if needed.

Please find below the log from the most recent deploy:

3:22:00 AM: Build ready to start
3:22:04 AM: build-image version: 6ebfb829398e07eb99ad5455777162ff19838822 (xenial)
3:22:04 AM: build-image tag: v3.10.5
3:22:04 AM: buildbot version: 7eafb394e33f42f945c880ce4ac17c149867813a
3:22:04 AM: Fetching cached dependencies
3:22:04 AM: Failed to fetch cache, continuing with build
3:22:04 AM: Starting to prepare the repo for build
3:22:05 AM: No cached dependencies found. Cloning fresh repo
3:22:05 AM: git clone https://github.com/anodpixels/portfolio
3:22:08 AM: Preparing Git Reference refs/heads/master
3:22:09 AM: Parsing package.json dependencies
3:22:10 AM: Starting build script
3:22:10 AM: Installing dependencies
3:22:10 AM: Python version set to 2.7
3:22:11 AM: Downloading and installing node v10.24.1...
3:22:11 AM: Downloading https://nodejs.org/dist/v10.24.1/node-v10.24.1-linux-x64.tar.xz...
3:22:11 AM: Computing checksum with sha256sum
3:22:11 AM: Checksums matched!
3:22:14 AM: Now using node v10.24.1 (npm v6.14.12)
3:22:15 AM: Started restoring cached build plugins
3:22:15 AM: Finished restoring cached build plugins
3:22:15 AM: Attempting ruby version 2.6.2, read from environment
3:22:16 AM: Using ruby version 2.6.2
3:22:16 AM: Using PHP version 5.6
3:22:16 AM: Started restoring cached go cache
3:22:16 AM: Finished restoring cached go cache
3:22:16 AM: Installing Go version 1.12
3:22:21 AM: unset GOOS;
3:22:21 AM: unset GOARCH;
3:22:21 AM: export GOROOT='/opt/buildhome/.gimme_cache/versions/go1.12.linux.amd64';
3:22:21 AM: export PATH="/opt/buildhome/.gimme_cache/versions/go1.12.linux.amd64/bin:${PATH}";
3:22:21 AM: go version >&2;
3:22:21 AM: export GIMME_ENV="/opt/buildhome/.gimme_cache/env/go1.12.linux.amd64.env"
3:22:21 AM: go version go1.12 linux/amd64
3:22:21 AM: Installing missing commands
3:22:21 AM: Verify run directory
3:22:22 AM: ​
3:22:22 AM: ────────────────────────────────────────────────────────────────
3:22:22 AM:   Netlify Build                                                 
3:22:22 AM: ────────────────────────────────────────────────────────────────
3:22:22 AM: ​
3:22:22 AM: ❯ Version
3:22:22 AM:   @netlify/build 26.4.0
3:22:22 AM: ​
3:22:22 AM: ❯ Flags
3:22:22 AM:   baseRelDir: true
3:22:22 AM:   buildId: 622aa4380da173000801fa2b
3:22:22 AM:   deployId: 622aa4380da173000801fa2d
3:22:22 AM: ​
3:22:22 AM: ❯ Current directory
3:22:22 AM:   /opt/build/repo
3:22:22 AM: ​
3:22:22 AM: ❯ Config file
3:22:22 AM:   No config file was defined: using default values.
3:22:22 AM: ​
3:22:22 AM: ❯ Context
3:22:22 AM:   production
3:22:22 AM: ​
3:22:22 AM: ❯ Installing plugins
3:22:22 AM:    - netlify-plugin-image-optim@0.4.0
3:22:43 AM: ​
3:22:43 AM: ❯ Loading plugins
3:22:43 AM:    - netlify-plugin-image-optim@0.4.0 from Netlify app
3:22:45 AM: ​
3:22:45 AM: ────────────────────────────────────────────────────────────────
3:22:45 AM:   1. netlify-plugin-image-optim (onPostBuild event)             
3:22:45 AM: ────────────────────────────────────────────────────────────────
3:22:45 AM: ​
3:25:43 AM: ​
3:25:43 AM: ────────────────────────────────────────────────────────────────
3:25:43 AM:   Plugin "netlify-plugin-image-optim" internal error            
3:25:43 AM: ────────────────────────────────────────────────────────────────
3:25:43 AM: ​
3:25:43 AM:   Error message
3:25:43 AM:   TypeError: Cannot set properties of undefined (setting 'post')
3:25:43 AM: ​
3:25:43 AM:   Plugin details
3:25:43 AM:   Package:        netlify-plugin-image-optim
3:25:43 AM:   Version:        0.4.0
3:25:43 AM:   Repository:     git+https://github.com/chrisdwheatley/netlify-plugin-image-optim.git
3:25:43 AM:   npm link:       https://www.npmjs.com/package/netlify-plugin-image-optim
3:25:43 AM:   Report issues:  https://github.com/chrisdwheatley/netlify-plugin-image-optim/issues
3:25:43 AM: ​
3:25:43 AM:   Error location
3:25:43 AM:   In "onPostBuild" event in "netlify-plugin-image-optim" from Netlify app
3:25:43 AM:       at /opt/build/repo/.netlify/plugins/node_modules/netlify-plugin-image-optim/index.js:38:26
3:25:43 AM:       at Array.map (<anonymous>)
3:25:43 AM:       at onPostBuild (/opt/build/repo/.netlify/plugins/node_modules/netlify-plugin-image-optim/index.js:34:22)
3:25:43 AM:       at async Object.run (file:///opt/buildhome/node-deps/node_modules/@netlify/build/src/plugins/child/run.js:21:3)
3:25:43 AM:       at async handleEvent (file:///opt/buildhome/node-deps/node_modules/@netlify/build/src/plugins/child/main.js:41:38)
3:25:43 AM:       at async process.<anonymous> (file:///opt/buildhome/node-deps/node_modules/@netlify/build/src/plugins/ipc.js:112:16)
3:25:43 AM: ​
3:25:43 AM:   Resolved config
3:25:43 AM:   build:
3:25:43 AM:     publish: /opt/build/repo
3:25:43 AM:     publishOrigin: ui
3:25:43 AM:   plugins:
3:25:43 AM:     - inputs: {}
3:25:43 AM:       origin: ui
3:25:43 AM:       package: netlify-plugin-image-optim
3:25:44 AM: Caching artifacts
3:25:44 AM: Started saving build plugins
3:25:44 AM: Finished saving build plugins
3:25:44 AM: Started saving pip cache
3:25:44 AM: Finished saving pip cache
3:25:44 AM: Started saving emacs cask dependencies
3:25:44 AM: Finished saving emacs cask dependencies
3:25:44 AM: Started saving maven dependencies
3:25:44 AM: Finished saving maven dependencies
3:25:44 AM: Started saving boot dependencies
3:25:44 AM: Finished saving boot dependencies
3:25:44 AM: Started saving rust rustup cache
3:25:44 AM: Finished saving rust rustup cache
3:25:44 AM: Started saving go dependencies
3:25:46 AM: Finished saving go dependencies
3:25:49 AM: Build failed due to a plugin error: Build script returned non-zero exit code: 3
3:25:50 AM: Creating deploy upload records
3:25:50 AM: Failing build: Failed to build site
3:25:50 AM: Failed during stage 'building site': Build script returned non-zero exit code: 3 (https://ntl.fyi/exit-code-3)
3:25:50 AM: Finished processing build request in 3m45.798634169s

hi there anodpizels,

any progress on resolving this issue since you last wrote in?

Hi there, unfortunelty no, there was no answer from Netlify on this, I need this fixed

Hey there, @anodpixels :wave:

Thanks for your patience here! Can you try using cloudinary instead of the plugin? Looking at the plugin repo, it seems like the original creators has not been active lately. This is not a plugin that is maintained by Netlify

If you are new to Cloudinary, you can also check out this Jamstack Explorers mission! It should help get you on the right track:

Again, thanks so much for your patience here!

Cloudinary crashes as well, I went in and unintalled Cloudinary and ImageOptim, and now I can build.
Thank you for the support!

1 Like

thanks so much for coming back and letting us know. Happy building :rocket:

I have a Plugin “@chiselstrike/netlify-plugin” failed error when deploy my site in netlify.
Of course, I already deployed that repo several times.
And it was working very well.
But it doesn’t working after some functions added in site.
Anyone knows this error?
Thank you.

Interesting and excellent article, thank you for sharing .

1 Like

Hi :wave:t6: , can you share what your site name/slug is?