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

Fail to run azd provision #1

Open
zimuli157 opened this issue Dec 4, 2024 · 9 comments
Open

Fail to run azd provision #1

zimuli157 opened this issue Dec 4, 2024 · 9 comments
Assignees
Labels
bug Something isn't working platform: windows

Comments

@zimuli157
Copy link

zimuli157 commented Dec 4, 2024

Description
An error occurred when running azd provision, as follows:
image

Repro steps

  1. Create a new folder and switch to it in the terminal.
  2. Run azd auth login.
  3. Run azd init -t llama-index-vector-search-javascript
  4. Run azd provision.

Environment

  • Azd version: azd version 1.11.0 (commit 5b92e0687e1fa96dfc8292f4b900c0c58610b6a5)
  • OS: Locally.

Expected behavior

Run azd provision can successfully.

@manekinekko and @hemarina for notification.

@manekinekko
Copy link
Contributor

Fixed in 2df1b33

@manekinekko
Copy link
Contributor

Thank you @v-xuto for testing the sample. All should be fixed now.

@zimuli157
Copy link
Author

@manekinekko This issue has been fixed. But after run azd deploy, a new issue appeared. When sending a message, as follows:
image

@manekinekko
Copy link
Contributor

manekinekko commented Dec 5, 2024

Hi @v-xuto I am unable to reproduce that error. I followed the steps from the readme and I get the app to work as expected. See details here.

@Menghua1
Copy link
Member

Menghua1 commented Dec 6, 2024

@manekinekko According to the latest code test, we will encounter the following problems when running azd provision:
image
After running npm install pnpm, we encounter the missing cross-env package, as follows:
image
After running the command pnpm install cross-env to solve the above issue, we encounter the following new issue:
image

@manekinekko manekinekko reopened this Dec 9, 2024
@manekinekko
Copy link
Contributor

Hi @v-xuto out of curiosity, which regions are you deploying to?

@Menghua1
Copy link
Member

Menghua1 commented Dec 10, 2024

@manekinekko We deployed on eastus2 and use Windows OS.

@Menghua1
Copy link
Member

Menghua1 commented Dec 10, 2024

@manekinekko Running azd provision will encounter issue 1, which requires installing pnpm. This error occurs on both Windows OS and Mac OS. You did not encounter this error, maybe you ran npm install pnpm before running azd provision , or you have installed pnpm globally locally. If legacy-peer-deps is set to true in your local npm config at this time, then npm install pnpm will also automatically install dependencies, and you will not encounter the following issue2.

  • Issue1
    image

After running npm install pnpm, we will encounter the error issue2 of missing cross-env package on Windows OS.

  • Issue2
    image

After running pnpm install cross-env, the issue3 encountered is as follows. This error only occurs on Windows OS, not on Mac OS. After investigation, it is because the environment variable value in the .env file loaded by the script is double quotes " ", which causes the script execution to fail. As shown in the figure:

  • Issue3
    image

Suggestion:

Adding npm install pnpm and pnpm install commands before pnpm generate in generate.ps1 can solve issue 1 and 2, as shown below:
image

Then adding .Trim('"') after $matches[2] in the file generate.ps1 to remove the double quotes" " can solve issue 3, as shown below:
image

manekinekko added a commit that referenced this issue Jan 17, 2025
Implement fixes suggested in #1
@manekinekko
Copy link
Contributor

Thank you @Menghua1 I applied your fixes as your suggested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working platform: windows
Projects
None yet
Development

No branches or pull requests

3 participants