tailwindlabs/tailwindcss · error · Error
The plugin "${detail.path}" does not accept options
Error message
The plugin "${detail.path}" does not accept options What it means
Thrown when resolving plugin details: options were provided for a plugin (`detail.options` is truthy) but the plugin is not an options-function (no `__isOptionsFunction` marker). Plain plugin functions accept no arguments, so passing options is invalid. The plugin path is included for identification.
Source
Thrown at packages/tailwindcss/src/compat/apply-compat-hooks.ts:265
if (!detail.options) {
return {
config: { plugins: [detail.plugin] },
base: detail.base,
reference: detail.reference,
src: detail.src,
}
}
if ('__isOptionsFunction' in detail.plugin) {
return {
config: { plugins: [detail.plugin(detail.options)] },
base: detail.base,
reference: detail.reference,
src: detail.src,
}
}
throw new Error(`The plugin "${detail.path}" does not accept options`)
})
let userConfig = [...pluginConfigs, ...configs]
let { resolvedConfig } = resolveConfig(designSystem, [
{ config: createCompatConfig(designSystem.theme), base, reference: true, src: undefined },
...userConfig,
{ config: { plugins: [darkModePlugin] }, base, reference: true, src: undefined },
])
let { resolvedConfig: resolvedUserConfig, replacedThemeKeys } = resolveConfig(
designSystem,
userConfig,
)
let pluginApiConfig = {
designSystem,
ast,
resolvedConfig,View on GitHub (pinned to 16e94cbf7f)
Solutions
- Remove the options block from the `@plugin` at-rule — call it as `@plugin "./plain-plugin.js";`.
- If the plugin should accept options, update it to use `plugin.withOptions((opts) => ({ handler }))` and re-export.
- Switch to a JS config file where you can pass options to a properly wrapped plugin.
Example fix
// before
@plugin "./plain-plugin.js" {
foo: bar;
}
// after
@plugin "./plain-plugin.js"; Defensive patterns
Strategy: type-guard
Validate before calling
function pluginAcceptsOptions(plugin) {
return '__isOptionsFunction' in plugin;
}
// if (options && !pluginAcceptsOptions(plugin)) { /* do not pass options */ } Type guard
function isOptionsPlugin(plugin: any): plugin is ((opts: any) => any) & { __isOptionsFunction: true } {
return '__isOptionsFunction' in plugin;
} Prevention
- Check for `plugin.withOptions` wrapping before passing options.
- Author plugins with `plugin.withOptions` when config is needed via CSS `@plugin`.
When it happens
Trigger: Writing `@plugin "./plain-plugin.js" { someOption: true }` where `plain-plugin.js` exports a bare `function({ addUtilities }) {...}` rather than `plugin.withOptions(...)`. The resolver receives options but the plugin cannot consume them.
Common situations: Treating a non-options plugin as if it accepted config; plugin author forgot to wrap with `plugin.withOptions`; mismatch between plugin API and CSS `@plugin` option syntax.
Related errors
- `@plugin` must have a path.
- Unexpected `@plugin` option: Value of declaration `${toCss([
- Cannot apply unprefixed utility class `${candidate}`. Did yo
- Cannot apply utility class `${candidate}` because it has bee
- `@plugin` cannot be nested.
AI-assisted analysis of tailwindlabs/tailwindcss@16e94cbf7f (2026-08-12).
Data as JSON: /api/errors/f9b7b5205d0e9408.
Report an issue: GitHub.