Skip to content

Cannot use compiled protos in my web app... #250

@Honya2000

Description

@Honya2000

Hallo,
I spent 2 days trying to use js proto in my web app.

I compiled .proto files to js using protoc compiler with protoc-gen-js plugin. Tried to use commonjs syntax and without it, my app still failes to import the js module.

In my app i'm improting proto this way:
import * as iproto from './protos/classificationlist';

When i'm using commonjs style - it complains that "require is not defined".

When i'm trying without commonjs - it complaines that "goog is not defined".

Not sure what else should i do.

I checked some web sources in official mediapipe github, they use standart import style like i'm using:
import {ClassificationList as ClassificationListProto} from '../../../../framework/formats/classification_pb';

But there is no additional information, everybody are using mediapipe as npm bundles. So not sure how it works there.

Any help will be appreciated...

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