Git Product home page Git Product logo

Comments (9)

xqi-aviatrix avatar xqi-aviatrix commented on September 24, 2024 1

+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.

LucasXu0 avatar LucasXu0 commented on September 24, 2024 1

FYI. Here's a workaround.

npm install -g protoc-gen-ts [email protected]

from protoc-gen-ts.

curquhart avatar curquhart commented on September 24, 2024

+1

from protoc-gen-ts.

SKTT1Ryze avatar SKTT1Ryze commented on September 24, 2024

+1
https://code.mycard.moe/mycard/neos-protobuf/-/jobs/82799

from protoc-gen-ts.

SKTT1Ryze avatar SKTT1Ryze commented on September 24, 2024

How can i solve this problem?

from protoc-gen-ts.

LucasXu0 avatar LucasXu0 commented on September 24, 2024

+1

from protoc-gen-ts.

thesayyn avatar thesayyn commented on September 24, 2024

I can confirm. Does anybody mind sending a PR for it?

from protoc-gen-ts.

SKTT1Ryze avatar SKTT1Ryze commented on September 24, 2024

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.

thesayyn avatar thesayyn commented on September 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.