Azure / static-web-apps-cli

Azure Static Web Apps CLI ✨
https://aka.ms/swa/cli-local-development
MIT License
585 stars 112 forks source link

Cannot extract `DataApiBuilder` zip file on Node v18.16.0 and Windows #700

Closed horihiro closed 11 months ago

horihiro commented 1 year ago

Before filing this issue, please ensure you're using the latest CLI by running swa --version and comparing to the latest version on npm.

Are you accessing the CLI from the default port :4280 ?

Make sure you are accessing the URL printed in the console when running swa start!

ℹ️ NOTE: Make sure to enable debug logs when running any swa commands using --verbose=silly

Describe the bug swa db init command cannot work properly with Node.js v18.16.0 (on WIndows at least)

To Reproduce Steps to reproduce the behavior:

  1. Launch Windows Sandbox
  2. Install Node.js v18.16.0
  3. Install SWA CLI v1.1.2
  4. Execute swa db init --database-type mssql in any directory

Expected behavior Config file staticwebapp.database.config.json would be generated without any error.

Screenshots image

The extracted executable file Microsoft.DataApiBuilder.exe is broken because it cannot be executed even from explorer and cmd, image

image

Desktop (please complete the following information):

Additional context This issue looks like unzipper's one on Node v18.16.0, because this can be resolved by manual extraction of dab_win-x64-x.y.z.zip.
https://github.com/ZJONSSON/node-unzipper/issues/271

cjk7989 commented 11 months ago

A new version of swa-cli (v1.1.4) has been published that fixes the issue (see #718). Sorry for the delay and thanks for your feedback.

horihiro commented 11 months ago

Thanks @cjk7989 I confirmed that this issue was resolved with swa-cli@v1.1.4 and node.js@v18.17.0.