'TensorFlow illegal hardware instruction [NodeJS] Mac M1

I am trying to import TensorFlow NodeJS implementation into my project but getting illegal hardware instruction on instantiation.

I see there are issues running Tensor on M1 chips, and there appears to be solutions for Python but what about JS? How can I run Tensor on my M1 Mac in a NodeJs environment?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source