-
Notifications
You must be signed in to change notification settings - Fork 72
Issue Occurring running protoc-gen-js command on windows 11 #142
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
Comments
Can you please describe your setup? One thing we didn't mention in the release notes for the binaries is that the windows one is built for mingw. We do not presently have a visual studio version. Additionally, the prebuilt protoc-gen-js binaries are dynamically linked, so wondering if it's a version mismatch. |
I rebuilt this project using bazel and VS Build Tools 2019. I think the original file was built via mingw with dynamic library which is not included in archive. |
I also encountered this problem, please help me ! ! ! |
We dynamically link against libstdc++ and do not provide a DLL with the expectation that it and other dependencies are already in your PATH. Can you confirm if you already have libstdc++ available? |
Libraries libstdc++-6.dll and libwinpthread-1.dll does not exists in OS Windows by default. |
Thank you for the info. For this particular plugin, we expected users to have MinGW. However, if the installer isn't placing the libraries anywhere useful, then we have a problem. At a minimum we should document the steps required to get it running. We can also look into the feasibility of distributing the DLLs themselves. Ideally we would use static linking, but it's just not how we're setup at present. |
+1 to this problem. I have tried several pre-built version of MinGW libraries, when I copy the dlls into same folder where protoc-gen-js located, the error from #issue-1402244641 disappeared. Instead, showing an another error: protoc-gen-js is from https://github.com/protocolbuffers/protobuf-javascript/releases/download/v3.21.2/protobuf-javascript-3.21.2-win64.zip |
+1 |
1 similar comment
+1 |
Similar to @Gateswong, having found and added those two .dll's to the same directory as the protoc-gen-js executable I still fail to run the protoc command:
It doesn't help that the error message is basically meaningless. |
For what it's worth I just generated the client I wanted inside WSL and copied files back into windows. Doesn't take that long. Faster than install c++ redistributables, VS build tools, MinGW etc and finding out none of it helps 😆 |
Using the following I can generate an .exe that works great when run from Powershell with Node 14 installed:
Get protoc-gen-js.exe from .\bazel-bin\generator Right now the distributed version (3.21.2) of protoc-gen-js.exe for Windows is effectively useless as there are no work arounds known that allows it to function. I even attempted to use it within MinGW to no avail. I've recently created the I have to say the sudden an unannounced decision to remove the "protoc-gen-js" plugin from being built into I assume your normal internal build tools that currently make the releases will always use MinGW and using a different environment is hard or impossible. What if you disabled the release for the win32 and win64 assets in Github from that internal tool and instead used Github Actions? A community member (I'd be happy to) could submit a github actions configuration and you could use that to do the release of just the windows binaries. |
Sorry for the delay; I was trying to see if I could get the build going, but running into problems that would take some time to sort through. We don't have an inherent limitation preventing windows builds; the current setup is just an artifact of what support was available to me at the time (it's bootstrapped off the work of others). That said, if you or anyone else is able to contribute a GitHub Action, I think that would significantly improve the situation. My main request is that the action pull down a pre-built protoc from the official GitHub project like we currently do in our other actions. Feel free to assign the review directly to me. |
I've just updated the latest release with new protoc-gen-js binaries for win32/64 (thanks again @yinzara for the build actions that produced them). Please let me know if you encounter any issues with them. |
Two errors :
#Unable to generate js files using protoc-gen-js files
The text was updated successfully, but these errors were encountered: