For NodeJS, FaceAPI does not bundle TFJS because of binary dependencies. You must install a TensorFlow.js backend first.
Supported NodeJS versions: 14 through 22. (NodeJS 23+ is not supported due to TFJS incompatibility).
Standard Installation
Use @tensorflow/tfjs-node for CPU execution.
GPU Accelerated Installation
Use @tensorflow/tfjs-node-gpu if you have CUDA libraries installed.
WASM Backend
Use this if your platform does not support TensorFlow binary libraries.
# Standard CPU
npm install @tensorflow/tfjs-node
npm install @vladmandic/face-api
# GPU Accelerated
npm install @tensorflow/tfjs-node-gpu
npm install @vladmandic/face-api
# WASM Backend
npm install @tensorflow/tfjs
npm install @tensorflow/tfjs-backend-wasm
npm install @vladmandic/face-api