FuelLabs/fuels-ts · error · FuelError
NO_ABIS_FOUND
NO_ABIS_FOUND
Error message
no ABI found at '${inputs}' What it means
After runTypegen resolves inputs to filepaths and reads each into abiFiles, it asserts that at least one ABI file was loaded. A zero-length result means the supplied globs/paths matched nothing on disk (the filepaths array was empty after glob expansion).
Source
Thrown at packages/abi-typegen/src/runTypegen.ts:68
`At least one parameter should be supplied: 'input' or 'filepaths'.`
);
}
/*
Assembling file paths x contents
*/
const abiFiles = filepaths.map((filepath) => {
const contents = readFileSync(filepath, 'utf-8');
const abi: IFile = {
path: filepath,
contents,
};
return abi;
});
if (!abiFiles.length) {
throw new FuelError(ErrorCode.NO_ABIS_FOUND, `no ABI found at '${inputs}'`);
}
const binFiles = collectBinFilepaths({ filepaths, programType });
const storageSlotsFiles = collectStorageSlotsFilepaths({ filepaths, programType });
/*
Starting the engine
*/
const abiTypeGen = new AbiTypeGen({
outputDir: output,
abiFiles,
binFiles,
storageSlotsFiles,
programType,
versions,
});
View on GitHub (pinned to b3f37c91ac)
Solutions
- Confirm the glob pattern matches files from the configured cwd (test with a glob library first).
- Use absolute or repo-relative paths and verify the files exist before invoking typegen.
- Ensure CI copies/generates ABI files before the typegen step.
Example fix
// before
runTypegen({ input: ['abis/*.json'], cwd: '/wrong/dir', ... });
// after
import { globSync } from 'glob';
const cwd = process.cwd();
const hits = globSync('abis/*-abi.json', { cwd });
if (!hits.length) throw new Error('no ABIs matched');
runTypegen({ input: ['abis/*-abi.json'], cwd, ... }); Defensive patterns
Strategy: validation
Validate before calling
import { globSync } from 'glob';
function assertGlobHits(patterns: string[], cwd: string) {
const hits = patterns.flatMap(p => globSync(p, { cwd }));
if (!hits.length) throw new Error(`no ABI files matched ${patterns.join(', ')} in ${cwd}`);
} Prevention
- Test your glob pattern with the same cwd before wiring it into typegen.
- Use repo-relative or absolute paths in CI.
- Ensure the ABI-generation step runs before typegen in CI.
When it happens
Trigger: Supplying an `input` glob that resolves to no files (wrong cwd, wrong pattern); pointing at a directory containing no `-abi.json` files; glob syntax error that silently matches nothing.
Common situations: Running typegen from the wrong working directory; glob pattern with a typo (`abis/*.json` vs `abis/**/*-abi.json`); CI checkout missing the ABI artifacts step.
Related errors
- BIN_FILE_NOT_FOUND
- INVALID_INPUT_PARAMETERS
- PARSE_FAILED
- MISSING_REQUIRED_PARAMETER
- ABI_MAIN_METHOD_MISSING
AI-assisted analysis of FuelLabs/fuels-ts@b3f37c91ac (2026-08-12).
Data as JSON: /api/errors/12bac6287582f3f4.
Report an issue: GitHub.