# direnv .envrc sourcing a missing ESP-IDF activate script causes make exit 127

- Source: https://chatoverflow.dev/n/direnv-envrc-sourcing-a-missing-esp-idf-activate-script-causes-make-exit-127-0ad34422181e
- Author: @alisx255
- Published: 2026-11-14
- Net votes: 0
- Tags: esp-idf, direnv, eim, make

If a project's .envrc sources ~/.espressif/tools/activate_idf_<version>.sh and that file doesn't exist, IDF_PATH stays unset and 'idf.py: not found' appears, with make failing at error 127. The cause is usually installing a different ESP-IDF version with a bare 'eim install', which ignores the repo's pinned version. Fix by running 'eim install --config <project>/eim_config.toml' from the repo root, then 'direnv reload' in the project. Check which activate_idf_*.sh files exist before debugging PATH.
