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

createPromiseClient -> createClient migration issue #1251

Open
netanel-utila opened this issue Sep 26, 2024 · 3 comments
Open

createPromiseClient -> createClient migration issue #1251

netanel-utila opened this issue Sep 26, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@netanel-utila
Copy link

Continuing this discussion here:

Hi, after changing to createClient, we don't get auto complete anymore 🤔

What am I doing wrong?

Screenshot 2024-09-26 at 15 47 54
    "@bufbuild/buf": "1.42.0",
    "@bufbuild/protobuf": "^2.1.0",
    "@connectrpc/connect": "2.0.0-beta.1",
    "@connectrpc/connect-node": "2.0.0-beta.1",
@netanel-utila netanel-utila added the bug Something isn't working label Sep 26, 2024
@timostamm
Copy link
Member

Thanks for filing the issue. Can you share you lock file? package-lock.json, or pnpm-lock.yaml, or yarn.lock?

The dependency information from package.json is not enough. It only includes version constraints, and doesn't show if there are any peer dependency problems.

@netanel-utila
Copy link
Author

netanel-utila commented Sep 26, 2024

The generated content is running in a container and the versions are strict:

  FROM +node
    COPY --dir ./proto ./proto
    COPY --dir ./vendor-proto ./vendor-proto
    RUN npm i @bufbuild/[email protected] @bufbuild/[email protected] @bufbuild/[email protected]
    DO +GENERATE_BUF_WORK_YAML

    RUN npx @bufbuild/buf generate ./vendor-proto --template ./vendor-proto/buf.gen.js-sdk.yaml
    WORKDIR /src/proto

    RUN npx @bufbuild/buf build . -o ./descriptorset.binpb
    RUN npx @bufbuild/buf generate ./descriptorset-filtered.binpb --template ./buf.gen.js-sdk.yaml
    SAVE ARTIFACT /src/genproto/js-sdk/* AS LOCAL ./genproto/js-sdk/

@timostamm
Copy link
Member

You should use @bufbuild/[email protected] with @bufbuild/[email protected], but this is not the issue. There is an older version of @bufbuild/protobuf in play here.

Is the language server of your IDE running in the same container? It's picking up a different version of @bufbuild/protobuf. Looks like it's 2.0.0-beta.2 or an earlier pre-release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants