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 the command npm run env:init #3

Closed
zhangjiale-64 opened this issue Jul 2, 2024 · 5 comments
Closed

Fail to run the command npm run env:init #3

zhangjiale-64 opened this issue Jul 2, 2024 · 5 comments

Comments

@zhangjiale-64
Copy link

zhangjiale-64 commented Jul 2, 2024

Describe the issue:
Run command npm run env:init in Windows (bash) ,Devcontainer and Codespaces, get error as follow:
image

Repro Steps:

  1. Run git clone https://github.com/pinecone-io/pinecone-rag-demo-azd.git
  2. Run cd pinecone-rag-demo-azd
  3. Run npm i
  4. Run npm run env:init

Environments:

  • azd version: 1.9.3 (commit e1624330dcc7dde440ecc1eda06aac40e68aa0a3)
  • os: Windows, DevContainer and codespace

Expected behavior:

Running the command npm run env:init can successfully create the ".env.local" file.

@hemarina and @cwaddingham for notification.

@cwaddingham
Copy link
Collaborator

@zhangjiale-64 please be sure you have set the required environment variables and secrets, either in your local environment or in your Github project. Please see the README.md for the full list of required variables.

@zhangjiale-64
Copy link
Author

@zhangjiale-64 please be sure you have set the required environment variables and secrets, either in your local environment or in your Github project. Please see the README.md for the full list of required variables.

@cwaddingham please update the README.md to include all required environment variables and resources, such as Pinecone and OpenAI services. Include links to relevant documentation or registration pages to assist users in setting up. After I have configured the required environment variables, run the azd deploy command, get error as follow:
image
image

Repro Steps:

  1. Run git clone https://github.com/pinecone-io/pinecone-rag-demo-azd.git
  2. Run cd pinecone-rag-demo-azd
  3. Run npm i
  4. Run npm run env:init
  5. Run azd auth login
  6. Run azd provision
  7. Run azd deploy

Environments:

  • azd version: 1.9.3 (commit e1624330dcc7dde440ecc1eda06aac40e68aa0a3)
  • os: Windows, DevContainer and codespace

@cwaddingham
Copy link
Collaborator

I've added the environment variables to the README.md file, please review, set in your local environment or fork, and try again.

For convenience they are:

  • PINECONE_API_KEY={your Pinecone API key}
  • OPENAI_API_KEY={your OpenAI API key}
  • PINECONE_REGION={your Pinecone region}
    • The region your index is hosted in, or will be created in.
  • PINECONE_INDEX={your index name}
    • Defaults to pinecone-rag-demo-azd.
  • AZURE_ENV_NAME=prod
    • This doesn't need to match the GitHub Environment name and because it is used when generating Azure resource names it's a good idea to keep it short
  • AZURE_TENANT_ID={tenant_id}
    • Replace {tenant_id} with your Tenant's Tenant ID
  • AZURE_SUBSCRIPTION_ID={subscription_id}
    • Replace {subscription_id} with your Subscription's Subscription ID
  • AZURE_CLIENT_ID={service_principal_id}
    • Replace {service_principal_id} with your Service principal's Application ID
  • AZURE_LOCATION={location_name}
    • Replace {location_name} with your desired region name
    • You can see a list of region names using the Azure CLI: az account list-locations -o table
  • SERVICE_WEB_CONTAINER_MIN_REPLICAS=1
    • Assuming that you don't want your production app to scale to zero

@gkulin
Copy link

gkulin commented Jul 12, 2024

@zhangjiale-64 @v-xuto were you able to successfully run npm run env:init after configuring the required env variables Cory provided?

@zhangjiale-64
Copy link
Author

@zhangjiale-64 @v-xuto were you able to successfully run npm run env:init after configuring the required env variables Cory provided?

Sorry for the delayed response. This issue has been fixed and I will close it.

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

3 participants