Fala pessoal, tudo bem? Estou tentando fazer deploy de uma API NodeJS, escrita em TypeScript que tem como dependência o TensorflowJS (@tensorflow/tfjs-node
). Porém, ao executar o script npm install
(ao reiniciar o container), recebo os seguintes logs de erro:
Jan 22 05:18:07 npm ERR! /usr/src/app/.npm/_logs/2021-01-22T08_18_07_758Z-debug.log
Jan 22 05:18:07 npm ERR! A complete log of this run can be found in:
Jan 22 05:18:07
Jan 22 05:18:07 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Jan 22 05:18:07 npm ERR! Failed at the nome-do-projeto@1.0.0 start script.
Jan 22 05:18:07 npm ERR!
Jan 22 05:18:07 npm ERR! Exit status 132
Jan 22 05:18:07 npm ERR! nome-do-projeto@1.0.0 start: `npm run build && cd dist && node index.js`
Jan 22 05:18:07 npm ERR! errno 132
Jan 22 05:18:07 npm ERR! code ELIFECYCLE
Jan 22 05:18:07 Illegal instruction (core dumped)
Jan 22 05:18:07 node-pre-gyp info This Node instance does not support builds for N-API version 7
Jan 22 05:18:07 node-pre-gyp info This Node instance does not support builds for N-API version 6
Jan 22 05:18:07 node-pre-gyp info This Node instance does not support builds for N-API version 7
Jan 22 05:18:07 node-pre-gyp info This Node instance does not support builds for N-API version 6
Jan 22 05:18:00
Jan 22 05:18:00 > tsc
Jan 22 05:18:00 > nome-do-projeto@1.0.0 build /usr/src/app
Meu package.json
{
"name": "nome-do-projeto",
"version": "1.0.0",
"description": "Rest API",
"main": "./dist/index.js",
"scripts": {
"dev": "npm run build && ts-node-dev --transpile-only index.ts",
"start": "npm run build && cd dist && node index.js",
"build": "tsc"
},
"devDependencies": {
"@types/chance": "^1.1.1",
"@types/cors": "^2.8.9",
"@types/express": "^4.17.9",
"@types/multer": "^1.4.5",
"@types/mysql": "^2.15.17",
"@types/node": "^14.14.22",
"@types/sharp": "^0.26.1"
},
"dependencies": {
"@lighthouseapps/utils": "^1.4.0",
"@tensorflow/tfjs-automl": "^1.0.0",
"@tensorflow/tfjs-node": "^2.8.3",
"axios": "^0.21.1",
"bcryptjs": "^2.4.3",
"chance": "^1.1.7",
"cors": "^2.8.5",
"dotenv": "^8.2.0",
"express": "^4.17.1",
"jsonwebtoken": "^8.5.1",
"module-alias": "^2.2.2",
"moment": "^2.29.1",
"multer": "^1.4.2",
"mysql2": "^2.2.5",
"sharp": "^0.27.0",
"ts-node-dev": "^1.0.0",
"typescript": "^4.1.2"
}
}
Notas:
- Executando localmente, com o Node na versão
v12.18.3
, tudo ocorre bem… - Realizando o deploy no Heroku, tudo funciona também
Alguém tem alguma ideia de solução? Estou perdido