TWRP recovery: "pm install /path/to.apk" not working
Use script to place the APK file at the correct place in /data/app instead.

mkdir,mv,chown and chmod are to be used.

While pm binary is there, it cannot do it's work from recovery that is a completely different system.
See this as someone trying to install a game on his Windows system while booted on Ubuntu.