2

I'm trying to connect to local node using polkadot/api library but when I start my project it return this error in the library enter image description here

Here is my code: enter image description here

1 Answer 1

6

The error means you need to use a babel loader that supports private class fields.

We also ran into this issue, and fixed it with proper build config. We have a working build here but we're using TypeScript not JavaScript. Maybe that might help you.

It also looks like you aren't the only one, someone reported something like it earlier this year.

2
  • 3
    Thank you so much! Your client saves my days!!!
    – marethyu
    Aug 2, 2022 at 4:16
  • Great! If you don't mind, would you please mark your question as answered so people can easily find what worked? Thanks :) Aug 2, 2022 at 20:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.