-
Notifications
You must be signed in to change notification settings - Fork 132
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
prefer system installed protoc #60
Comments
Thanks for the report. There is no built-in option to support this. @protobuf-ts/protoc is already looking at the package.json. If It should be possible to add a second key Would this solve the issue? |
Hmm - I think that'd be fine, I was otherwise thinking to auto-detect if protoc is already found in the $PATH (sans the |
Searches protoc in $PATH (unless package.json config.protocVersion is set). If not found in $PATH, installs latest version. Needs doc update.
Agreed, preferring $PATH is better. Users could opt out of $PATH and ensure installation by setting I think this commit should do it. Do you have a way to test this? |
just ran it, seems to have done the trick! Thank you! |
👍 Released in v2.0.0-alpha.11 |
Hello, Is it possible to backport this fix to v1.x? |
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. |
Yes that did work! Thanks for the help. |
We have a monorepo and use protoc for more than our web client which is why it's installed and configured in our development container systemwide. As such, the
protoc
installed into ournode_modules/.bin
folder from@protobuf-ts/plugin
is getting priority in our build scripts and is missing a bunch of includes we rely on. Is there a way to disable installing this dependency and/or have a config option to prefer the system-wide installed version?our "build" scripts are scripts defined in our
package.json
The text was updated successfully, but these errors were encountered: