Skip to content

Invalid paths resolving #491

@KonstantinSerebryakov

Description

@KonstantinSerebryakov

The problem occured loading cloud/texttospeech/v1/cloud_tts_lrs.proto. It try to load the related file with duplicated path. The substring of the path is duplicated in the error message ("google\cloud\texttospeech\v1\google\cloud\texttospeech\v1" - is repeated twice in path)

Steps to reproduce

  1. Run the code
  2. See the error

Code:

import * as protos from "google-proto-files";

const paths = {
  v1: protos.getProtoPath("cloud/texttospeech/v1/cloud_tts.proto"),
  v1_lrs: protos.getProtoPath("cloud/texttospeech/v1/cloud_tts_lrs.proto"),
};

protos.loadSync(
  paths.v1_lrs
);

Error message:

Error: ENOENT: no such file or directory, open 'C:\PROJECTS\google_ai_text_to_speech\node_modules\google-proto-files\google\cloud\texttospeech\v1\google\cloud\texttospeech\v1\cloud_tts.proto'

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions