Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

261
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!