[NODEJS-1767] Make type dectection way better

Fix env problem