Skip to content

gt-node: initializeGT() does not auto-read GT_API_KEY from environment #1044

@moss-bryophyta

Description

@moss-bryophyta

Problem

The gt-node quickstart instructs users to set GT_API_KEY in a .env file, but initializeGT() does not automatically read it from process.env. The example only passes projectId: process.env.GT_PROJECT_ID — not the API key.

When following the quickstart exactly, the server logs:

I18nManager: devApiKey or apiKey is required

And translations do not work.

Expected behavior

initializeGT() should auto-read GT_API_KEY from process.env (similar to how it reads GT_PROJECT_ID), or the quickstart should explicitly pass devApiKey: process.env.GT_API_KEY.

Steps to reproduce

  1. Follow the gt-node quickstart exactly
  2. Set GT_API_KEY and GT_PROJECT_ID in .env
  3. Run the full example Express server
  4. Observe the warning and no translations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions