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

build error in angular #11

Closed
tinyhill666 opened this issue Jun 28, 2020 · 3 comments
Closed

build error in angular #11

tinyhill666 opened this issue Jun 28, 2020 · 3 comments

Comments

@tinyhill666
Copy link

ERROR in node_modules/anchor-link/lib/link-options.d.ts(37,19): error TS2304: Cannot find name 'TextEncoder'.
node_modules/anchor-link/lib/link-options.d.ts(41,19): error TS2304: Cannot find name 'TextDecoder'.
node_modules/anchor-link/lib/link-session.d.ts(85,21): error TS1039: Initializers are not allowed in ambient contexts.
node_modules/anchor-link/lib/link-session.d.ts(88,5): error TS2424: Class 'LinkSession' defines instance member function 'serialize', but extended class 'LinkChannelSession' defines it as instance member property.
node_modules/anchor-link/lib/link-session.d.ts(121,21): error TS1039: Initializers are not allowed in ambient contexts.
node_modules/anchor-link/lib/link-session.d.ts(127,5): error TS2424: Class 'LinkSession' defines instance member function 'serialize', but extended class 'LinkFallbackSession' defines it as instance member property.
node_modules/eosio-signing-request/lib/signing-request.d.ts(242,73): error TS2304: Cannot find name 'TextEncoder'.
node_modules/eosio-signing-request/lib/signing-request.d.ts(242,99): error TS2304: Cannot find name 'TextDecoder'.

@jnordberg
Copy link
Member

@aaroncox
Copy link
Member

You'll need to specify an encoder and decoder if the version of Angular you're using doesn't define them by default.

// initialize the link
const link = new AnchorLink({
    textDecoder: new TextDecoder(),
    textEncoder: new TextEncoder(),
    transport
})

If those are undefined in the version of JS/TS you're using, you may need a polyfill.

https://github.com/anonyco/FastestSmallestTextEncoderDecoder

@jnordberg
Copy link
Member

Closing as this relates to version 2.0 and no further details where given.

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