beyerleinf / esbuild-azure-functions

A ✨blazingly fast✨ builder for Azure Functions powered by esbuild.
MIT License
12 stars 2 forks source link

npx esbuild-azure-functions fails #9

Closed philzartis closed 2 years ago

philzartis commented 2 years ago

First and foremost, thanks for this library 🤗

On node 16 on Windows running npx esbuild-azure-functions (via fish-shell on git-bash) just opens the node_modules/esbuild-azure-functions/build/src/cli.js file with the default editor, and in GH Actions it fails to execute, throwing this error:

image

I fixed my local build by mimicking other files in the bin folder (example below showing cmd comparison with rimraf, changes are highlighted): image

Assuming there's a missing shebang line in cli file. The above is for release v1.1.1.

beyerleinf commented 2 years ago

Hi, thanks for reporting this! I'm going to test this (and your fix) out later tonight. Unless this is super urgent for you?

philzartis commented 2 years ago

Much appreciated. Not urgent at all! Let me know if I can help in any way :)

beyerleinf commented 2 years ago

@philzartis Can you please test version 1.1.2-test and let me know if it fixed your issue?

philzartis commented 2 years ago

I can confirm that the issue is fixed. The generated bin files for windows (cmd & ps2) also have a different structure now (I wish npm documented this magical behavior clearer). Thanks Fabian! 💪

beyerleinf commented 2 years ago

Very interesting. I'm going the publish the proper version later and let you know :)

beyerleinf commented 2 years ago

Just published v.1.1.2