Rebuild To Fix Lib Import Errors
Testing & Qualityrebuild-to-fix-lib-import-errorsRebuild To Fix Lib Import Errors is an Agent Skill for testing & quality published in the LedgerHQ/ledger-live repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
When typecheck finds an error importing from a lib in the monorepo, rebuild the lib
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/LedgerHQ/ledger-live/blob/HEAD/.agents/skills/rebuild-to-fix-lib-import-errors/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/rebuild-to-fix-lib-import-errors, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
When typecheck finds an error importing from a lib in the monorepo rebuild the lib using the command below:
nx run @ledgerhq/name_of_lib_here:build
Example
live-countervalues-react has been updated and the import in live-common is erroring
We run typecheck and get the following error:
src/currencies/hooks.ts:1:10 - error TS2305: Module '"@ledgerhq/live-countervalues-react"' has no exported member 'useMarketcapIds'. 1 import { useMarketcapIds } from "@ledgerhq/live-countervalues-react";
We need to rebuild @ledgerhq/live-countervalues-react
nx run @ledgerhq/live-countervalues-react:build