nestjs / azure-func-http

Azure Functions HTTP adapter for Nest framework (node.js) 🌥
https://nestjs.com/
MIT License
151 stars 40 forks source link

Azure Functions v4 support #934

Open AndrzejKomarnicki opened 2 years ago

AndrzejKomarnicki commented 2 years ago

When doing npm run build && func host start I get the following error:

Warning: Proxies are not supported in Azure Functions v4. Instead of 'proxies.json', try Azure API Management: https://aka.ms/AAfiueq

After trying to access the endpoint, for example: https://nestjstest1.azurewebsites.net/api

I get the following error:

Server Error

502 - Web server received an invalid response while acting as a gateway or proxy server. There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.

Please add Azure Functions v4 support, which has been out since last year.

Reference:

https://techcommunity.microsoft.com/t5/apps-on-azure-blog/azure-functions-v4-versus-v3/ba-p/3276055

kamilmysliwiec commented 1 year ago

Would you like to create a PR for this feature?

diberry commented 1 year ago

There is a new v4 runtime for Node.js which makes the programming model more app-centric. It is in preview. I would like to update this package to work with the new programming model but I'm not sure what the previous issue in this thread would mean in terms of creating a pr.

AndrzejKomarnicki commented 1 year ago

Closing issue, I'm not working on anything Azure related anymore.

johnykes commented 11 months ago

After hours of trying different things...

I managed to fix this error by using Azure Functions ~4, but with LINUX (node 18, 32bit). update: it seems it also worked for Windows, node 20, 64bit.

But only using an old version for azure functions... "@azure/functions": "^1.0.3",

Hopefully this will help somebody.

Please don't abandon this project 😢

pigulla commented 3 months ago

For what it's worth, I've tried to throw money at this problem by contacting Trilon (via the contact form, twice by mail and via Twitter) but received nothing but silence.

As a last-ditch effort, maybe ping @MarkPieszak or @kamilmysliwiec to see if their company actually wants business. And why not ping @henriqueweiand, @delucca, @flamewow, @camilacnery and @mcarballido while I'm at it. All my other efforts to reach out to Trilon have unfortunately utterly failed.

EtienneDeneuve commented 3 months ago

Hello,

I needed it, so we did it : https://github.com/Simplifi-ED/azure-func-http/pkgs/npm/azure-func-http

It's almost the same, but updated.

PR and tests are warmly welcomed

pigulla commented 3 months ago

Nice! I will take a look at it next week and do some testing.

pigulla commented 3 months ago

@EtienneDeneuve, could you publish it to npm? That would make testing it a lot easier (using an alias). Installing it directly from GitHub doesn't contain the dist files so it's kind of a PITA :)

EtienneDeneuve commented 3 months ago

Sure, I did on https://www.npmjs.com/package/@edeneuve/azure-func-http But I need to check if it's up to date ...