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

WebIDLParseError, unrecognised tokens #5

Open
Ohems opened this issue Jul 25, 2023 · 2 comments
Open

WebIDLParseError, unrecognised tokens #5

Ohems opened this issue Jul 25, 2023 · 2 comments

Comments

@Ohems
Copy link

Ohems commented Jul 25, 2023

I'm trying to run the type generation from a fresh clone and with a brand new ammo.idl file last updated in commit 1a601e4. This is the output:

PS D:\Coding\JavaScript\ammo.js-typings> npm install
added 141 packages from 133 contributors and audited 141 packages in 3.155s
found 33 vulnerabilities (14 moderate, 14 high, 5 critical)
  run `npm audit fix` to fix them, or `npm audit` for details
PS D:\Coding\JavaScript\ammo.js-typings> npm run build

> @types/[email protected] build D:\Coding\JavaScript\ammo.js-typings
> ts-node build.ts


D:\Coding\JavaScript\ammo.js-typings\node_modules\webidl2\dist\webpack:\WebIDL2\lib\tokeniser.js:228
    throw new WebIDLParseError(syntaxError(this.source, this.position, this.current, message));
          ^
WebIDLParseError: Syntax error at line 49, since `interface btVector4`:
btVector4 implements btVector3;
^ Unrecognised tokens
    at tokeniser_Tokeniser.error (D:\Coding\JavaScript\ammo.js-typings\node_modules\webidl2\dist\webpack:\WebIDL2\lib\tokeniser.js:228:11)
    at error (D:\Coding\JavaScript\ammo.js-typings\node_modules\webidl2\dist\webpack:\WebIDL2\lib\webidl2.js:25:15)
    at parseByTokens (D:\Coding\JavaScript\ammo.js-typings\node_modules\webidl2\dist\webpack:\WebIDL2\lib\webidl2.js:90:43)
    at Module.j (D:\Coding\JavaScript\ammo.js-typings\node_modules\webidl2\dist\webpack:\WebIDL2\lib\webidl2.js:105:10)
    at AmmoJsTypeDefinitionsGenerator.generate (D:\Coding\JavaScript\ammo.js-typings\build.ts:219:31)
    at Object.<anonymous> (D:\Coding\JavaScript\ammo.js-typings\build.ts:246:26)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module.m._compile (D:\Coding\JavaScript\ammo.js-typings\node_modules\ts-node\src\index.ts:814:23)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Object.require.extensions.<computed> [as .ts] (D:\Coding\JavaScript\ammo.js-typings\node_modules\ts-node\src\index.ts:817:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @types/[email protected] build: `ts-node build.ts`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @types/[email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Daniel\AppData\Roaming\npm-cache\_logs\2023-07-25T09_02_57_922Z-debug.log
PS D:\Coding\JavaScript\ammo.js-typings> node --version
v18.16.0
PS D:\Coding\JavaScript\ammo.js-typings> npm --version
6.14.5

I'm on Windows 11, running the commands inside Powershell.

@Ohems
Copy link
Author

Ohems commented Jul 25, 2023

Seems to be a problem in the WebIDL parser. Inputting the contents of the ammo.idl file to their online parser yields the same error.

@Ohems
Copy link
Author

Ohems commented Jul 25, 2023

The ammo.idl file appears to have faulty syntax within. Opened an issue here kripken/ammo.js#418

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