liabru/matter-js · warning
Plugin.dependencies: used by could not be resolved.
Error message
Plugin.dependencies: used by could not be resolved.
What it means
Plugin.dependencies warns when a dependency listed in a plugin's 'uses' array cannot be resolved, i.e. no registered or useable plugin matches the dependency name. The dependency is simply not satisfied and the dependent plugin is marked warned.
Solutions
- Pass the missing dependency plugin in the same Matter.use([dependentPlugin, dependencyPlugin]) call so it can be resolved.
- Register the dependency with Plugin.register(dependencyPlugin) before use.
- Fix the dependency name spelling in the plugin's 'uses' array.
- Remove the stale entry from 'uses' if the dependency is no longer needed.
Example fix
// before Matter.use(myPhysicsPlugin); // uses: ['my-render'] // after Matter.use([myPhysicsPlugin, myRenderPlugin]);
Defensive patterns
Strategy: validation
Validate before calling
plugin.uses.forEach(function (dep) {
if (!Plugin.resolve(dep)) {
throw new Error('Dependency ' + dep + ' is not registered; pass it in the same Matter.use call');
}
}); Prevention
- Always pass a plugin and its dependencies together: Matter.use([plugin, ...plugin.uses.map(resolve)]).
- Register all plugins with Plugin.register at startup before any Matter.use call.
- Grep your 'uses' arrays against your registered plugin names after renames/refactors.
When it happens
Trigger: A plugin declares uses: ['some-plugin'] (optionally with @range) but 'some-plugin' was never registered via Plugin.register nor included in the same Matter.use call, and it is not resolvable from the dependency's own exports.
Common situations: Misspelled plugin names in the uses array; forgetting to pass the dependency plugin in the same Matter.use(plugins) call; loading plugins in the wrong order or via module systems where the dependency isn't a resolvable require; removing a plugin during refactoring while others still reference it.
Related errors
- Plugin.dependencies: does not satisfy used by .
- Plugin.dependencyParse: is not a valid dependency string.
- Plugin.register: can not be downgraded to
- Plugin.register: does not implement all required fields.
- Plugin.register: is already registered to different plugin…
AI-assisted analysis of liabru/matter-js@acb99b6f87 (2026-09-02).
Data as JSON: /api/errors/7f80697cd0e1c7ab.
Report an issue: GitHub.
Appendix: source
Thrown at src/core/Plugin.js:214
tracked[name] = Common.map(module.uses || [], function(dependency) {
if (Plugin.isPlugin(dependency)) {
Plugin.register(dependency);
}
var parsed = Plugin.dependencyParse(dependency),
resolved = Plugin.resolve(dependency);
if (resolved && !Plugin.versionSatisfies(resolved.version, parsed.range)) {
Common.warn(
'Plugin.dependencies:', Plugin.toString(resolved), 'does not satisfy',
Plugin.toString(parsed), 'used by', Plugin.toString(parsedBase) + '.'
);
resolved._warned = true;
module._warned = true;
} else if (!resolved) {
Common.warn(
'Plugin.dependencies:', Plugin.toString(dependency), 'used by',
Plugin.toString(parsedBase), 'could not be resolved.'
);
module._warned = true;
}
return parsed.name;
});
for (var i = 0; i < tracked[name].length; i += 1) {
Plugin.dependencies(tracked[name][i], tracked);
}
return tracked;
};
/**View on GitHub (pinned to acb99b6f87)