Netlify keeps invoking a plugin that was removed and crashes every build



Netlify build crashes trying to fetch a ghost plugin.

(netlify-plugin-inline-critical-css was removed from package.json and netlify.toml but every build keeps trying to fetch it).


I experience crashes with netlify-plugin-inline-critical-css plugin since a few days ( Error: Failed to inline critical CSS. Penthouse timed out after …)

The plugin is invoked from netlify.toml

# [[plugins]]
#   package = "netlify-plugin-inline-critical-css"

#   [plugins.inputs]
#  directoryFilter = ["!annees", "!specialites", "!tags"]

and cited as devDependency in package.json.

Therefore I want to remove the plugin for now to have a fresh build. I remove it from netlify.toml and uninstall it from npm devdependencies.
However, Netlify build keeps trying to invoke the plugin even though I erased every trace of it.
I tried to change the Ubuntu version (16 <> 20) to have a fresh environment but same crash trying to import the ghost plugin.

**Plugin "netlify-plugin-inline-critical-css" internal error**

Could not import plugin:
**Plugin "netlify-plugin-inline-critical-css" internal error**

Could not import plugin: Error: The module '/opt/build/repo/node_modules/canvas/build/Release/canvas.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 83. This version of Node.js requires NODE_MODULE_VERSION 93. Please try re-compiling or re-installing the module (for instance, using `npm rebuild` or `npm install` ).

While loading "netlify-plugin-inline-critical-css" from Netlify app at Object.Module._extensions..node (node:internal/modules/cjs/loader:1189:18) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:102:18) at Object.<anonymous> (/opt/build/repo/node_modules/canvas/lib/bindings.js:3:18) at Module._compile (node:internal/modules/cjs/loader:1105:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12)

Error properties: { code: 'ERR_DLOPEN_FAILED' }

Thanks a lot,



Netlify was calling the plugin from an UI option.

Go to SiteName > Plugins: Build Plugins.

There netlify-plugin-inline-critical-css was shown active.

It was not shown as activated in section:

Build Plugins add extra functionality to your site build. Plugins are created by developers at Netlify and in the community. All plugin support is provided by plugin authors.

The Inline critcal CSS was showing Install button, even though it was already activated.