Giter Site home page Giter Site logo

Comments (3)

timostamm avatar timostamm commented on May 21, 2024 2

Hey Alexandros, thank you for testing the approach via "scripts", I was about to mention this. npm and yarn will set up the path the executables automatically for you in scripts.

node_modules\.bin\protoc-gen-es is also an alternative (not the backslash instead of a slash), but it will not work cross-platform.

We will look into updating our documentation for this, thanks for the report!

from connect-es.

alexandros-megas avatar alexandros-megas commented on May 21, 2024

Ok, so I'm not sure if this is just a me-issue, or a docs-issue, but after stumbling on this section in the protoc-gen-connect-web README (https://github.com/bufbuild/connect-web/tree/main/packages/protoc-gen-connect-web#with-protoc), I did a bit more experimentation and was able to fix this with the following:

  1. Add a new script to my package.json: "bufgen": "buf generate"
  2. Change the two path properties in buf.gen.yaml to be just the name of the executable script. eg path: protoc-gen-es and path: protoc-gen-connect-web.
  3. Run the npm/yarn script: yarn bufgen

Gives the following output:

> yarn bufgen
yarn run v1.22.18
$ buf generate
Done in 3.29s.

from connect-es.

smaye81 avatar smaye81 commented on May 21, 2024

Updated our docs to more prominently suggest the "scripts" approach. In addition, added text for users who want to use protoc from the command line, with links to our protoc-gen-connect-web README.

View the docs here: https://connect.build/docs/web/generating-code#local-generation

Hopefully this makes things a bit more clear.

from connect-es.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.