Skip to content

npm run fetch-mdn fails #876

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

Closed
simonwep opened this issue Jun 21, 2020 · 3 comments
Closed

npm run fetch-mdn fails #876

simonwep opened this issue Jun 21, 2020 · 3 comments

Comments

@simonwep
Copy link

Hi, I wanted to update type-definitions for #875 and first fetch the latest specs and build my own version. The command npm run fetch-mdn fails with the following message:

WebIDLParseError: Syntax error at line 1:
WebIDL[Exposed=Window
^ Unrecognised tokens
    at tokeniser_Tokeniser.error (G:\...\TSJS-lib-generator\node_modules\webidl2\dist\webidl2.js:1:2
0350)
    at r (G:\...\TSJS-lib-generator\node_modules\webidl2\dist\webidl2.js:1:33487)
    at L (G:\...\TSJS-lib-generator\node_modules\webidl2\dist\webidl2.js:1:34464)
    at Module.q (G:\...\TSJS-lib-generator\node_modules\webidl2\dist\webidl2.js:1:34604)
    at Object.convert (G:\...\TSJS-lib-generator\lib\widlprocess.js:26:31)
    at convertWidl (G:\...\TSJS-lib-generator\lib\index.js:96:38)
    at Array.map (<anonymous>)
    at emitDom (G:\...\TSJS-lib-generator\lib\index.js:89:42)
    at Object.<anonymous> (G:\...\TSJS-lib-generator\lib\index.js:227:1)
    at Module._compile (internal/modules/cjs/loader.js:1133:30) {
  bareMessage: 'Unrecognised tokens',
  context: 'Syntax error at line 1:\nWebIDL[Exposed=Window\n^',
  line: 1,
  sourceName: undefined,
  input: 'WebIDL[Exposed=Window',
  tokens: [
    {
      type: 'identifier',
      value: 'WebIDL',
      trivia: '',
      line: 1,
      index: 0
    },
    { type: '[', value: '[', trivia: '', line: 1, index: 1 },
    {
      type: 'identifier',
      value: 'Exposed',
      trivia: '',
      line: 1,
      index: 2
    },
    { type: '=', value: '=', trivia: '', line: 1, index: 3 },
    {
      type: 'identifier',
      value: 'Window',
      trivia: '',
      line: 1,
      index: 4
    }
  ]
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! tsjs-lib-generator@ build: `tsc -p ./tsconfig.json && node ./lib/index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the tsjs-lib-generator@ 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:\...\npm-cache\_logs\2020-06-21T15_30_47_360Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! tsjs-lib-generator@ fetch-mdn: `npm run build && node ./lib/mdnfetcher.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the tsjs-lib-generator@ fetch-mdn 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:\...\npm-cache\_logs\2020-06-21T15_30_47_387Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! tsjs-lib-generator@ fetch: `echo This could take a few minutes... && npm run fetch-idl && npm run fetch-mdn
`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the tsjs-lib-generator@ fetch 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:\...\npm-cache\_logs\2020-06-21T15_30_47_414Z-debug.log

Tested on these machines:

os: Windows 10 Pro
node: v12.16.3
npm: 6.14.5
os: Ubuntu 18.04.4 LTS
node: v10.21.0
npm: 6.14.4

The error message is the same. The problem can (hopefully) be reproduced using

npm run install && npm run fetch # Or npm run fetch-mdn
@Bashamega
Copy link
Contributor

Hello @saschanaz
This issue should be closed because this command no longer exists, and hopefully we can integrate comments in

#1940

@saschanaz
Copy link
Contributor

👍🏻

@github-actions close

Copy link
Contributor

github-actions bot commented Apr 1, 2025

Closing because @saschanaz is one of the code-owners of this repository.

@github-actions github-actions bot closed this as completed Apr 1, 2025
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

3 participants