Hi Joseff,
You need to add that dependencies to package.json in order to include that library.
{
"type": "module",
"main": "index.mjs",
"dependencies": {
"@xenova/transformers": "^1.0.0" // Ensure you have the correct version
}
}
References:
- https://learn.microsoft.com/en-us/azure/azure-functions/functions-reference-node?tabs=javascript%2Cwindows%2Cazure-cli&pivots=nodejs-model-v4
- https://techcommunity.microsoft.com/t5/apps-on-azure-blog/run-node-js-14-in-azure-functions/ba-p/2195063
- https://learn.microsoft.com/en-us/answers/questions/1333087/how-can-i-get-my-azure-function-app-to-support-ecm
If the information helped address your question, please Accept the answer.
Luis