Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run azd provision error on Windows #12

Closed
NanaXiong00 opened this issue Aug 23, 2024 · 5 comments
Closed

Run azd provision error on Windows #12

NanaXiong00 opened this issue Aug 23, 2024 · 5 comments

Comments

@NanaXiong00
Copy link

Describe the issue:
When running azd provision on Windows, an error is displayed indicating a syntax rule error in the hook script as follows:
image

Repro Steps:

  1. Clone the project.
  2. Run python -m venv .venv and .venv\Scripts\activate.
  3. Run pip install -r requirements.txt.
  4. Run azd auth login.
  5. Run npm i.
  6. Run npm run env:init.
  7. Run azd provision.

Environment:

  • Azd version: azd version 1.9.6 (commit 0b1a8ad350177078312141f4465ad72205d7c077)
  • OS: Windows desktop.

Expected behavior:
Run azd provision successfully.

@hemarina and @cwaddingham for notification.

@NanaXiong00
Copy link
Author

@cwaddingham The issue described above can still be reproduced according to the latest code test. A code review found that the problem is preprovision.ps1 file in the code , where bash syntax was incorrectly used instead of powershell syntax.

@cwaddingham
Copy link
Collaborator

@NanaXiong00 please try it again.

@NanaXiong00
Copy link
Author

@NanaXiong00 please try it again.

@cwaddingham Based on the latest code retest, the following error occurred:

  • Run command npm run env:init:
    Screenshot 2024-08-27 144116
  • Run command azd provision:
    image

@cwaddingham
Copy link
Collaborator

@NanaXiong00 given the number of issues that have come up with running this template on Windows we're going to remove support for that OS from it. Going forward, it will be supported on MacOS and Linux. We may revisit this in the future, but for now, this first iteration will be POSIX-only.

@NanaXiong00
Copy link
Author

@cwaddingham While testing the template on macOS according to the instructions in README.md, the following issues were encountered:
Screenshot 2024-08-28 at 01 38 42
It is recommended to include dependency installation steps in the README.md to prevent these issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants