Currently, it’s possible to install plugins by adding the plugin package name to your site’s netlify.toml file, like so:
[[plugins]] package: "netlify-plugin-package-name"
Though this requires installation of the plugin from npm, we have historically not required the plugin to be included as a dependency in the site’s
package.json file. Instead, we have fallen back to installing it automatically, and printing a warning message in the logs.
However, this automatic installation process causes inefficiencies in builds, so we’re discontinuing it next Monday, December 14. At that point, any build with a plugin installed via
netlify.toml but not included in the site
package.json will cause the build to fail.
Note: This does not apply to plugins installed from the plugins directory in the Netlify UI. They will continue to install automatically with no code changes required.
If this happens in your build, you’ll find an error message identifying the plugin that needs to be installed. From the site’s base directory in your project repo, use npm, yarn, or any other Node.js package manager to add this plugin to devDependencies in package.json.
npm install -D netlify-plugin-package-name
yarn add -D netlify-plugin-package-name
After that, save the change to your
package.json file, commit and push, and your next build should complete without plugin installation warnings or errors. You can even do this today to avoid failures when the change is deployed. Check your recent deploy logs for a warning message to find out if your site is affected.
As always, if you have any questions, feel free to post them here!