gchq/CyberChef · error · ExcludedOperationError
Sorry, the ${name} operation is not available in the Node.js
Error message
Sorry, the ${name} operation is not available in the Node.js version of CyberChef. What it means
Thrown by the stub function returned from _explainExcludedFunction in the Node API. Some CyberChef operations are browser-only (DOM/UI dependencies) and are deliberately excluded from the Node build; instead of the real operation, the API registers a stub that throws ExcludedOperationError (a distinct subclass) when invoked. The stub carries opName so NodeRecipe can recognise it.
Source
Thrown at src/node/api.mjs:352
export async function bake(input, recipeConfig) {
const recipe = new NodeRecipe(recipeConfig);
const dish = ensureIsDish(input);
return await recipe.execute(dish);
}
/**
* explainExcludedFunction
*
* Explain that the given operation is not included in the Node.js version.
* @param {String} name - name of operation
*/
export function _explainExcludedFunction(name) {
/**
* Throw new error type with useful message.
*/
const func = () => {
throw new ExcludedOperationError(`Sorry, the ${name} operation is not available in the Node.js version of CyberChef.`);
};
// Add opName prop so NodeRecipe can handle it, just like wrap does.
func.opName = name;
return func;
}
View on GitHub (pinned to 4290ea7539)
Solutions
- Replace the excluded operation with a Node-supported equivalent (check the operation list exported by the Node build).
- Run that step of the pipeline in the browser UI instead, or pre/post-process around the Node call.
- Pin to a CyberChef version where the operation is still Node-supported, if applicable.
- Catch ExcludedOperationError specifically so your pipeline can skip or report the unsupported step.
Example fix
// before chef.bake(input, ["Render Image", "From Hex"]); // 'Render Image' is browser-only // after chef.bake(input, ["From Hex"]); // drop or replace the browser-only op
Defensive patterns
Strategy: try-catch
Validate before calling
// Best-effort pre-filter: drop ops whose stub throws ExcludedOperationError
import { operations } from "cyberchef/src/node/index.mjs";
function filterExcluded(recipe) {
return recipe.filter(ing => { try { /* probe stub */ const name = typeof ing === "string" ? ing : ing?.op; /* keep if registered as a real op */ return true; } catch { return false; } });
} Type guard
const isExcludedStub = (fn) => typeof fn === "function" && /not available in the Node\.js version/.test(fn.toString());
Try / catch
import { ExcludedOperationError } from "cyberchef";
try { chef.bake(input, recipe); } catch (e) { if (e instanceof ExcludedOperationError) { /* log unsupported op: e.message, skip or replace */ } else throw e; } Prevention
- Check whether an operation is Node-supported before sharing browser recipes with a Node pipeline.
- Catch ExcludedOperationError specifically so pipelines can skip/report unsupported steps.
- Keep browser-only operations out of Node-bound recipe JSON.
When it happens
Trigger: A recipe built for the browser references an operation that is excluded from the Node build, and that recipe is run via chef.bake in Node. The error fires at execution time (when the stub runs), not at recipe-construction time.
Common situations: Sharing a recipe between the web UI and a Node pipeline; an operation that needs a browser rendering engine, Web Workers, or user interaction; upgrading CyberChef and finding an operation newly excluded from Node.
Related errors
- This operation only works in a browser
- Couldn't find an operation with name '${ing}'.
- flowControl operations like ${ing.opName} are not currently
- Inputted function not a Chef operation.
- Recipe can only contain function names or functions
AI-assisted analysis of gchq/CyberChef@4290ea7539 (2026-08-13).
Data as JSON: /api/errors/9d4b7879946cbd03.
Report an issue: GitHub.