Comments (9)
+1. Can anyone help fix the issue in the code and publish a release?
We are hitting the similar issue in our github workflow where we have little control about the installed libs.
/opt/hostedtoolcache/node/18.15.0/x64/lib/node_modules/protoc-gen-ts/node_modules/typescript/lib/typescript.js:20482
array.pos = -1;
^
TypeError: Cannot create property 'pos' on string 'id'
at createNodeArray (/opt/hostedtoolcache/node/18.[15](https://github.com/AviatrixDev/proto-registry/actions/runs/4494178171/jobs/7906335301#step:9:16).0/x64/lib/node_modules/protoc-gen-ts/node_modules/typescript/lib/typescript.js:20482:17)
at Object.createGetAccessorDeclaration (/opt/hostedtoolcache/node/18.15.0/x64/lib/node_modules/protoc-gen-ts/node_modules/typescript/lib/typescript.js:21028:25)
at createGetter (/opt/hostedtoolcache/node/18.15.0/x64/lib/node_modules/protoc-gen-ts/src/descriptor.js:320:50)
at createMessage (/opt/hostedtoolcache/node/18.15.0/x64/lib/node_modules/protoc-gen-ts/src/descriptor.js:719:25)
at Object.processDescriptorRecursively (/opt/hostedtoolcache/node/18.15.0/x64/lib/node_modules/protoc-gen-ts/src/descriptor.js:752:9)
at /opt/hostedtoolcache/node/18.15.0/x64/lib/node_modules/protoc-gen-ts/src/index.js:47:82
at Array.flatMap (<anonymous>)
at Object.<anonymous> (/opt/hostedtoolcache/node/18.15.0/x64/lib/node_modules/protoc-gen-ts/src/index.js:47:40)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
Node.js v18.15.0
/opt/hostedtoolcache/node/18.15.0/x64/lib/node_modules/protoc-gen-ts/node_modules/typescript/lib/typescript.js:20482
array.pos = -1;
^
TypeError: Cannot create property 'pos' on string 'paths'
at createNodeArray (/opt/hostedtoolcache/node/18.15.0/x64/lib/node_modules/protoc-gen-ts/node_modules/typescript/lib/typescript.js:20482:[17](https://github.com/AviatrixDev/proto-registry/actions/runs/4494178171/jobs/7906335301#step:9:18))
at Object.createGetAccessorDeclaration (/opt/hostedtoolcache/node/[18](https://github.com/AviatrixDev/proto-registry/actions/runs/4494178171/jobs/7906335301#step:9:19).15.0/x64/lib/node_modules/protoc-gen-ts/node_modules/typescript/lib/typescript.js:21028:25)
at createGetter (/opt/hostedtoolcache/node/18.15.0/x64/lib/node_modules/protoc-gen-ts/src/descriptor.js:320:50)
at createMessage (/opt/hostedtoolcache/node/18.15.0/x64/lib/node_modules/protoc-gen-ts/src/descriptor.js:7[19](https://github.com/AviatrixDev/proto-registry/actions/runs/4494178171/jobs/7906335301#step:9:20):25)
at Object.processDescriptorRecursively (/opt/hostedtoolcache/node/18.15.0/x64/lib/node_modules/protoc-gen-ts/src/descriptor.js:752:9)
at /opt/hostedtoolcache/node/18.15.0/x64/lib/node_modules/protoc-gen-ts/src/index.js:47:82
at Array.flatMap (<anonymous>)
at Object.<anonymous> (/opt/hostedtoolcache/node/18.15.0/x64/lib/node_modules/protoc-gen-ts/src/index.js:47:40)
at Module._compile (node:internal/modules/cjs/loader:1[25](https://github.com/AviatrixDev/proto-registry/actions/runs/4494178171/jobs/7906335301#step:9:26)4:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
Node.js v18.15.0
from protoc-gen-ts.
FYI. Here's a workaround.
npm install -g protoc-gen-ts [email protected]
from protoc-gen-ts.
+1
from protoc-gen-ts.
+1
https://code.mycard.moe/mycard/neos-protobuf/-/jobs/82799
from protoc-gen-ts.
How can i solve this problem?
from protoc-gen-ts.
+1
from protoc-gen-ts.
I can confirm. Does anybody mind sending a PR for it?
from protoc-gen-ts.
I can confirm. Does anybody mind sending a PR for it?
I manually replace the version of typescript
in /Users/username/.nvm/versions/node/v18.9.0/lib/node_modules/protoc-gen-ts/package.json
with 4.9.x and it works:
{
...
"devDependencies": {
...
"typescript": "^4.3.4" -> "4.9.x"
}
}
Should we solve this issue by this way?
And it seems that it's a problem within 0.8.5
release, not the main
branch. Do you mean a PR for 0.8.5
release branch?
from protoc-gen-ts.
that's the principled fix here. main also has this problem.
NOTE: typescript has been causing a lot of problems lately. I'll ship it bundled.
from protoc-gen-ts.
Related Issues (20)
- Generation with target=web HOT 3
- Cannot use ‘in’ operator to search for ‘Array’ in undefined; HOT 2
- Get `Error: EAGAIN: resource temporarily unavailable, read` when maybe many files are specified as input HOT 1
- Support Promises in Server Definition
- npm package needs publishing to include fix for typescript >= 5 HOT 8
- The namespace 'Google protobuf' does not have an exported member 'BinaryWriter' HOT 1
- `toObject()` inferred type too long when compiled with `declaration: true` HOT 1
- More fleshed out example
- Proto with oneof and other field is generated as union instead of intersect
- `Property 'xy' of type 'z' is not assignable to 'string' index type 'UntypedHandleCall'.` for class properties
- Add `as const` to UnimplementedService definition
- TSC error with compiler option noUnusedLocals HOT 2
- import_style=es6 ? HOT 1
- Consuming JSON For Tests and Converting To Protoc HOT 1
- I need to generate file interface IUser {} HOT 3
- Property 'Buffer' does not exist on type 'typeof globalThis' HOT 2
- [rust] Error starting the proto build with new rust wasm package. Error when executing /usr/bin/protoc-gen-ts HOT 1
- [rust] proto3 optional fields support
- methodName conflict HOT 1
- snake_case to camelCase conversion HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from protoc-gen-ts.