Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

270
Visualizações
Deployment of Node native modules to Azure WebSites,I'm experiencing some problems
  • I deploy a node application to the Azure website.
  • The tricky part is that I'm using a node module called "opencv" that needs to be compiled at install time using node-gyp.
  • I use the node-gyp rebuild --arch=ia32 command to compile it int the windows10. But when I used it in the Azure website, I get following problem:
Wed Apr 26 2017 04:48:35 GMT+0000 (Coordinated Universal Time): Application has thrown an uncaught exception and is terminated:

Error: The specified module could not be found.

\\?\D:\home\site\wwwroot\app\api\lib\opencv.node

at Error (native)
at Object.Module._extensions..node (module.js:434:18)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (D:\home\site\wwwroot\app\api\lib\image_operation.js:5:14)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)

This is the code I call:

'use strict';
var fs = require('fs');
var path = require('path');
var opencv = require("./opencv.node");

function isContains(str, substr) {
    return new RegExp(substr).test(str);
}

module.exports = {
    post: function (imageInfo, data) {
        if (isContains(imageInfo.imageName, ".yuv")) {
            var imageName = imageInfo.imageName.substr(0, imageInfo.imageName.length - 3) + "jpg";
            opencv.yuvToJpeg(path.resolve(__dirname, "../../image/" + imageName), imageInfo.width, imageInfo.height, Array.prototype.slice.call(data, 0));
        } else if (isContains(imageInfo.imageName, ".jpg")) {
            fs.writeFileSync(path.resolve(__dirname, "../../image/" + imageInfo.imageName), data);
    }
            return "success";
    }
};

But that file is in-fact deployed on the server:

Please help me, and tell me what to do

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Its readme says that "You'll need OpenCV 2.3.1 or newer installed before installing node-opencv". And as Azure Web Apps is a Software as a service (SaaS), we don't have the privilege to install arbitrary software there. But if that is a requirement for you, you'll need to use an alternative offering, like Cloud Service or VM.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda