Use export FACTER_myfactname=overridevalue, e.g.
puppet agent -t
This is useful when a fact is normally set during the initial puppet run, but the node catalog won’t compile until the fact is already set on the node (i.e. if you can’t run puppet agent -t until puppet agent -t has been run successfully, catch 22)
The error messages which are generated normally don’t specifically state that the fact doesn’t exist, rather another module will fail to compile into the catalog, you may need to search several levels down before reaching the offending fact