Giter VIP home page Giter VIP logo

Comments (8)

timostamm avatar timostamm commented on May 26, 2024

Thanks for the report. There is no built-in option to support this.

@protobuf-ts/protoc is already looking at the package.json. If pkg.config.protocVersion is set, it tries to install protoc in this version.

It should be possible to add a second key pkg.config.useProtocPath. If set, @protobuf-ts/protoc could execute protoc from this path, and not install it's own version at all.

Would this solve the issue?

from protobuf-ts.

someone1 avatar someone1 commented on May 26, 2024

Hmm - I think that'd be fine, I was otherwise thinking to auto-detect if protoc is already found in the $PATH (sans the node_modules/.bin directory) and use that before resorting to installing it.

from protobuf-ts.

timostamm avatar timostamm commented on May 26, 2024

Agreed, preferring $PATH is better.

Users could opt out of $PATH and ensure installation by setting pkg.config.protocVersion explicitly.

I think this commit should do it. Do you have a way to test this?

from protobuf-ts.

someone1 avatar someone1 commented on May 26, 2024

just ran it, seems to have done the trick!

Thank you!

from protobuf-ts.

timostamm avatar timostamm commented on May 26, 2024

👍

Released in v2.0.0-alpha.11

from protobuf-ts.

gganley avatar gganley commented on May 26, 2024

Hello,

Is it possible to backport this fix to v1.x?

from protobuf-ts.

timostamm avatar timostamm commented on May 26, 2024

Could you try updating @protobuf-ts/protoc ?

npm i @protobuf-ts/protoc@next

This updates the "protoc" package only and keeps the 1.x version for everything else.

I am pretty sure that the new version of the "protoc" package should work just fine, but it would help a lot if you could confirm.

If this does not cause any problems, I can backport and publish as 1.x.

from protobuf-ts.

gganley avatar gganley commented on May 26, 2024

Yes that did work! Thanks for the help.

from protobuf-ts.

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.