You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[api-extractor] Error: Symbol not found for identifier: WebAssembly #1370
bitcoin-ts $ yarn
bitcoin-ts $ yarn build
bitcoin-ts $ api-extractor run --local --verbose
api-extractor 7.3.0 - https://api-extractor.com/
Using configuration from /[...]/bitcoin-ts/api-extractor.json
Error: Symbol not found for identifier: WebAssembly
The repo is bitauth/bitcoin-ts, and the only non-default configuration is: "mainEntryPointFilePath": "<projectFolder>/build/main/index.d.ts",.
changed the title [-]Error: Symbol not found for identifier: WebAssembly[/-][+][api-extractor] Error: Symbol not found for identifier: WebAssembly[/+]on Jul 10, 2019
Ian Clanton-Thuon (@iclanton) thanks for the quick response. Yes –"lib" is currently set to [ "es2017", "esnext.bigint", "dom" ], and the WebAssembly namespace is now in lib.dom.d.ts. (A recent development – previously separate in @types/webassembly-js-api.)
Is there a better way to generate debug logs or a more verbose error message?
Ah, very sorry, I thought I had also reproduced the issue on the master branch. I just pushed an api-extractor branch where I'm getting the error. Thanks for your help!
Ok, after trying the --diagnostics flag, the issue is definitely that it's using the version of lib.dom.d.ts from typescript v3.4.5 (node_modules/@microsoft/api-extractor/node_modules/typescript/lib/lib.dom.d.ts), but my project is built with that from 3.5.3 (node_modules/typescript/lib/lib.dom.d.ts). The WebAssembly namespace was added to lib.dom.d.ts in microsoft/TypeScript@1e7482a, which didn't get released until v3.5.1.
Pete Gonzalez (@octogonz) not sure how I didn't realize it was a CLI option – working well now, thanks! (And thanks for the fantastic project! Looking forward to building out my documentation with this.)
Activity
[-]Error: Symbol not found for identifier: WebAssembly[/-][+][api-extractor] Error: Symbol not found for identifier: WebAssembly[/+]iclanton commentedon Jul 10, 2019
Do you have the typings for WebAssembly referenced in your
tsconfig.json?bitjson commentedon Jul 10, 2019
Ian Clanton-Thuon (@iclanton) thanks for the quick response. Yes –
"lib"is currently set to[ "es2017", "esnext.bigint", "dom" ], and the WebAssembly namespace is now inlib.dom.d.ts. (A recent development – previously separate in @types/webassembly-js-api.)Is there a better way to generate debug logs or a more verbose error message?
octogonz commentedon Jul 11, 2019
Yes, you can do
api-extractor run --local --diagnostics.I cannot repro this error. I did this:
api-extractor initusing 7.3.0mainEntryPointFilePathas you said.api-extractor run --local --diagnosticsIt generated the rollup and API report just fine. I am using NodeJS 10.13.0 on Windows 10.
Jason Dreyzehner (@bitjson) could you provide more specific repro steps?
bitjson commentedon Jul 11, 2019
Ah, very sorry, I thought I had also reproduced the issue on the
masterbranch. I just pushed anapi-extractorbranch where I'm getting the error. Thanks for your help!bitjson commentedon Jul 11, 2019
Ok, after trying the
--diagnosticsflag, the issue is definitely that it's using the version oflib.dom.d.tsfrom typescriptv3.4.5(node_modules/@microsoft/api-extractor/node_modules/typescript/lib/lib.dom.d.ts), but my project is built with that from3.5.3(node_modules/typescript/lib/lib.dom.d.ts). TheWebAssemblynamespace was added tolib.dom.d.tsin microsoft/TypeScript@1e7482a, which didn't get released untilv3.5.1.I see some info in the documentation about
IExtractorInvokeOptions.typescriptCompilerFolder. That sounds like what I need to adjust, but I'm not sure if I understand how – can that be set inapi-extractor.json? (I don't see it in the schema.)octogonz commentedon Jul 11, 2019
Awesome! PR #1359 paid off after just a few days. :-D
octogonz commentedon Jul 11, 2019
The right fix is for us to upgrade API Extractor's TypeScript compiler.
It's a command-line option
--typescript-compiler-folder. You can use that as a workaround.octogonz commentedon Jul 11, 2019
Here's a PR: #1372
bitjson commentedon Jul 11, 2019
Pete Gonzalez (@octogonz) not sure how I didn't realize it was a CLI option – working well now, thanks! (And thanks for the fantastic project! Looking forward to building out my documentation with this.)