bcrypt not a valid win 32 application on azure app service

前端 未结 1 1787
庸人自扰
庸人自扰 2021-01-23 02:53

In order to do some image processing using the Node library, Sharp, I had to upgrade my node executable on Azure App Service to 64-bits. I did this by downloading the executable

1条回答
  •  南方客
    南方客 (楼主)
    2021-01-23 03:18

    The default node.js executation applications on Azure Web Apps are all in 32bit. So it raises your issue. We can use the custom node.js runtime to achieve your requirement. Please try the following steps:

    1, Put a 64bit node.exe executation application in your application, e.g. in a runtime folder.

    2, Modify the iisnode.yml, set:

    nodeProcessCommandLine: "D:\home\site\wwwroot\runtime\node.exe"
    

    3, Deploy your entire application to Azure Web Apps.

    Additionally, you can use the following code to verify that whether the node.js binary is x64 or not.

    var http = require("http");
    
    http.createServer(function (request, response) {
        response.writeHead(200, { "Content-Type": "text/plain" });
        response.write(require('os').arch());
        response.end();
    
    }).listen(process.env.PORT);
    

    Please let me know if this does not work.

    0 讨论(0)
提交回复
热议问题