'Node - tfjs (tensorflowjs in node) error: zsh: illegal hardware instruction node app.js

I am working with tensorflowjs in node. when i run the code, "const tf = require('@tensorflow/tfjs-node');" it throw an error "zsh: illegal hardware instruction node app.js".

i am using macbook air M1 chip.



Sources

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

Source: Stack Overflow

Solution Source