Troubleshooting
Common errors and their solutions when working with typeCAD.
Import and Module Errors
“Cannot find module ‘@typecad/typecad’”
Cause: Component created in wrong directory or @typecad/typecad
not installed.
Solution:
- Ensure you’re working in the
hw/
directory - Check that
hw/package.json
includes@typecad/typecad
dependency - Run
npm install
in thehw/
directory
“Module has no exported member ‘Connector’”
Cause: Importing from wrong package path.
// ❌ Wrong
import { Connector } from '@typecad/passives/0603';
// ✅ Correct
import { Connector } from '@typecad/passives/connector';
Connection Errors
“Property ‘connect’ does not exist on type ‘Pin’”
Cause: Using non-existent .connect()
method.
// ❌ Wrong
pin1.connect(pin2);
// ✅ Correct
typecad.net(pin1, pin2);
“Property ‘pin’ does not exist”
Cause: Using string-based pin access on components with named pins.
// ❌ Wrong
esp32.pin('VDD')
// ✅ Correct
esp32.VDD // or esp32.pin(8) if VDD is pin 8
Component Creation Errors
“Cannot find name ‘ComponentName’”
Cause: Component file not imported or created in wrong location.
Solution:
- Ensure component was created with
@typecad/add-component
- Check the import statement matches the generated file
- Verify component file is in
hw/src/
directory
Component properties not working
// ❌ Wrong
new Connector({ pins: 3 })
// ✅ Correct
new Connector({ number: 3 })
Check the component documentation for correct property names.
Build Errors
TypeScript compilation errors
- Check all imports are correct
- Ensure all components are properly created with
typecad.create()
- Verify pin connections use correct syntax
KiCAD file generation issues
- Ensure all components have valid symbols and footprints
- Check that all nets have at least 2 pins connected
- Verify component references are unique
Getting Help
If you’re still stuck:
- Check the Examples for working code patterns
- Join the Reddit community
- Review the API documentation for correct syntax
On This Page