-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
pbts generates invalid typescript when used on Windows #1275
Comments
I have the same issue |
This happens to me too. |
By the way, I think this is a compatibility issue with the latest version of Node. I'm using 12.4.0, and pbts hasn't really been updated at all in a year or so. The dependencies that it installs aren't at all related to parsing the actual jsdocs, so I don't think that's it either. I'm going to try on some previous versions and see which one works in a bit. |
Waiting for your good news. |
I was getting the same error when using node 12.8.0. I've now rolled-back to the latest LTS release, 10.16.3, and now my files are correct. |
I'm using So workarounds like using an older version of node don't really work for us. I took a look at the way I will make a PR into this repo when I've finished my current thread. |
PR is here #1338 |
* Change Husky pre-commit hook to work on Windows Source: typicode/husky#281 * Update protobufjs to resolve TS compilation on Windows Source: protobufjs/protobuf.js#1275 * Switch to a patched version of hard-source aurelia/webpack-plugin#136 * Use `env` instead of `export` for Windows compatibility https://stackoverflow.com/questions/25112510/how-to-set-environment-variables-from-within-package-json
protobuf.js version: 6.8.8
When on Windows, pbts generates invalid typescript even though pbjs is outputting the correct annotated js file.
Using the test proto from the protobufjs repo here.
The expected typescript file would contain
as seen here.
Instead the type file contains
which is invalid typescript code.
The commands I ran for the conversion were
The text was updated successfully, but these errors were encountered: