Skip to content
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

Cannot create property 'pos' on string 'T' #17

Open
AndyGura opened this issue May 7, 2024 · 0 comments
Open

Cannot create property 'pos' on string 'T' #17

AndyGura opened this issue May 7, 2024 · 0 comments

Comments

@AndyGura
Copy link

AndyGura commented May 7, 2024

When trying to run command from readme

webidl2ts -e -i https://raw.githubusercontent.com/kripken/ammo.js/master/ammo.idl -o ammo.d.ts

I encounter this error. Full console output:

(node:277438) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
DeprecationWarning: 'createTypeReferenceNode' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.
DeprecationWarning: 'createParameterDeclaration' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.
DeprecationWarning: 'createKeywordTypeNode' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.
DeprecationWarning: 'createMethodSignature' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.
DeprecationWarning: 'createIdentifier' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.
DeprecationWarning: 'createClassDeclaration' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.
DeprecationWarning: 'createExpressionWithTypeArguments' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.
DeprecationWarning: 'createHeritageClause' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.
DeprecationWarning: 'createToken' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.
DeprecationWarning: 'createPropertySignature' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.
DeprecationWarning: 'createStringLiteral' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.
DeprecationWarning: 'createLiteralTypeNode' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.
DeprecationWarning: 'createUnionTypeNode' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.
DeprecationWarning: 'createTypeAliasDeclaration' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.
DeprecationWarning: 'createModifier' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.
DeprecationWarning: 'createTypeParameterDeclaration' has been deprecated since v4.0.0. Use the appropriate method on 'ts.factory' or the 'factory' supplied by your transformation context instead.
/usr/lib/node_modules/webidl2ts/node_modules/typescript/lib/typescript.js:21342
        range.pos = pos;
                  ^

TypeError: Cannot create property 'pos' on string 'T'
    at setTextRangePos (/usr/lib/node_modules/webidl2ts/node_modules/typescript/lib/typescript.js:21342:19)
    at Object.setTextRangePosEnd (/usr/lib/node_modules/webidl2ts/node_modules/typescript/lib/typescript.js:21360:32)
    at createNodeArray (/usr/lib/node_modules/webidl2ts/node_modules/typescript/lib/typescript.js:22985:16)
    at asNodeArray (/usr/lib/node_modules/webidl2ts/node_modules/typescript/lib/typescript.js:27581:28)
    at createBaseNamedDeclaration (/usr/lib/node_modules/webidl2ts/node_modules/typescript/lib/typescript.js:23009:34)
    at Object.createTypeParameterDeclaration (/usr/lib/node_modules/webidl2ts/node_modules/typescript/lib/typescript.js:23450:24)
    at Object.createTypeParameterDeclaration (/usr/lib/node_modules/webidl2ts/node_modules/typescript/lib/typescript.js:3138:29)
    at Object.printEmscriptenModule (/usr/lib/node_modules/webidl2ts/dist/print-ts.js:36:30)
    at /usr/lib/node_modules/webidl2ts/dist/cli.js:126:47
    at step (/usr/lib/node_modules/webidl2ts/dist/cli.js:34:23)

Node.js v21.6.2

How shall I fix that? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant