airtable-extension
Building an Airtable extension
An Airtable extension is a React app that runs inside a base, built on the Airtable Blocks SDK (@airtable/blocks, UI from @airtable/blocks/ui). Source conventionally lives in frontend/. It reads the base's tables/records and calls your own backend. Command-level playbook: itsryanarmani/scripts scripts/airtable-extension/README.md.
The trap that 404s your whole install: there is NO @airtable/blocks-ui
The UI components (Button, Input, initializeBlock, …) come from the @airtable/blocks/ui subpath of the single @airtable/blocks package — NOT a separate @airtable/blocks-ui npm package. Adding @airtable/blocks-ui to dependencies makes npm install fail with a 404, which installs nothing (including @airtable/blocks), and every import then reports "Cannot find module @airtable/blocks." One phantom dependency breaks the entire build. Depend on @airtable/blocks only; import UI from @airtable/blocks/ui.
The other traps
- React 16/17, not 18. The Blocks SDK targets React 16/17. Mount the standalone/dev shell with
ReactDOM.render(<App/>, el)—import { createRoot } from "react-dom/client"(React 18) fails to resolve against the pinned React 17. Inside Airtable, mount viainitializeBlock(() => <App/>)from@airtable/blocks/ui, not your own root. frontend/, notsrc/. The Blocks toolchain expects the code underfrontend/; a tsconfigincludepointing atsrctypechecks nothing.block.jsoncarries the block identity; keep it, it's whatblock run/block releaseuse.- globalConfig for config, not localStorage — persist the API key + table mapping in
globalConfig(shared per-installation), and gate onhasPermissionbefore writes.