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

pbjs gives "Error: duplicate name 'Http' in Namespace .google.api" #1970

Open
cusher opened this issue Feb 2, 2024 · 0 comments
Open

pbjs gives "Error: duplicate name 'Http' in Namespace .google.api" #1970

cusher opened this issue Feb 2, 2024 · 0 comments

Comments

@cusher
Copy link

cusher commented Feb 2, 2024

protobuf.js version: 7.2.6 (cli version: 1.1.2)

With previous versions, including 7.2.5, building many proto files into a single bundle with pbjs/pbts works without issue, e.g.:

node_modules/protobufjs-cli/bin/pbjs -p ../../ $protofiles --keep-case -w commonjs -t json-module -o src/app/proto-reflection.js

With version 7.2.6 installed, this now gives an error:

/projectdir/node_modules/protobufjs-cli/pbjs.js:254
            throw err;
            ^

Error: duplicate name 'Http' in Namespace .google.api
    at Namespace.add (/projectdir/node_modules/protobufjs/src/namespace.js:239:23)
    at parseType (/projectdir/node_modules/protobufjs/src/parse.js:354:16)
    at parseCommon (/projectdir/node_modules/protobufjs/src/parse.js:261:17)
    at parse (/projectdir/node_modules/protobufjs/src/parse.js:842:21)
    at process (/projectdir/node_modules/protobufjs/src/root.js:127:30)
    at fetch (/projectdir/node_modules/protobufjs/src/root.js:179:13)
    at process (/projectdir/node_modules/protobufjs/src/root.js:133:29)
    at fetch (/projectdir/node_modules/protobufjs/src/root.js:179:13)
    at process (/projectdir/node_modules/protobufjs/src/root.js:133:29)
    at fetch (/projectdir/node_modules/protobufjs/src/root.js:179:13)
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

1 participant