-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
TypeError: Cannot read property 'hasOwnProperty' of null #31
Comments
This seems to be something that's broken when running against typescript versions >= 4.0. In #32 I get similar errors if I upgrade to TSv4. This will eventually be a breaking change that forces me to move off of protoc-gen-ts. |
I'm sorry that I can't look into this right now because I don't have a computer to work on this. I have been out of work for 2 months. So it would be great if someone could send a PR for this. |
y3llowcake/protoc-gen-ts is no longer maintained: y3llowcake/protoc-gen-ts#2 (comment) FWIW, neither is this one w/ a similar name: thesayyn/protoc-gen-ts: thesayyn/protoc-gen-ts#31 (comment)
y3llowcake/protoc-gen-ts is no longer maintained: y3llowcake/protoc-gen-ts#2 (comment) FWIW, neither is this one w/ a similar name: thesayyn/protoc-gen-ts: thesayyn/protoc-gen-ts#31 (comment)
This is a great finding. I would appreciate if you can send a PR to fix this. I would be happy to assist you on it and get it merged and released. Also: This repository is not unmaintained. i don't even have enough resources to live right now. Let alone fix a problem when i don't have any resources. |
have create the pull request for this fix. |
Thanks to @dreamershl. A fix landed for this on master which will be released quickly. |
D:\IdeaProjects\ml\ml-shared>npm install -g protoc-gen-ts
C:\Users\yzf\AppData\Roaming\npm\protoc-gen-ts -> C:\Users\yzf\AppData\Roaming\npm\node_modules\protoc-gen-ts\bin\protoc-gen-ts
npm WARN protoc-gen-ts@0.3.4 requires a peer of typescript@^4.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN protoc-gen-ts@0.3.4 requires a peer of google-protobuf@^3.13.0 but none is installed. You must install peer dependencies yourself.
added 1 package in 0.267s
D:\IdeaProjects\ml\ml-shared>protoc-3.9.0-windows-x86_64.exe --ts_out=dist ./proto/game.proto
C:\Users\yzf\AppData\Roaming\npm\node_modules\typescript\lib\typescript.js:12449
return array.hasOwnProperty("pos") && array.hasOwnProperty("end");
^
TypeError: Cannot read property 'hasOwnProperty' of null
at Object.isNodeArray (C:\Users\yzf\AppData\Roaming\npm\node_modules\typescript\lib\typescript.js:12449:22)
at createNodeArray (C:\Users\yzf\AppData\Roaming\npm\node_modules\typescript\lib\typescript.js:20812:25)
at Object.createCallExpression (C:\Users\yzf\AppData\Roaming\npm\node_modules\typescript\lib\typescript.js:22099:95)
at Object.createCall (C:\Users\yzf\AppData\Roaming\npm\node_modules\typescript\lib\typescript.js:3022:29)
at createToObject (C:\Users\yzf\AppData\Roaming\npm\node_modules\protoc-gen-ts\index.js:49:14)
at createMessage (C:\Users\yzf\AppData\Roaming\npm\node_modules\protoc-gen-ts\index.js:1016:5)
at processMessageDescriptor (C:\Users\yzf\AppData\Roaming\npm\node_modules\protoc-gen-ts\index.js:1545:5)
at processProtoDescriptor (C:\Users\yzf\AppData\Roaming\npm\node_modules\protoc-gen-ts\index.js:1590:12)
at main (C:\Users\yzf\AppData\Roaming\npm\node_modules\protoc-gen-ts\index.js:1680:24)
at Object. (C:\Users\yzf\AppData\Roaming\npm\node_modules\protoc-gen-ts\index.js:1765:1)
--ts_out: protoc-gen-ts: Plugin failed with status code 1.
The text was updated successfully, but these errors were encountered: