2

I can't import Anchor into my freshly create React web app template. Why is this happening? These are my steps to replicate below. I think somebody else was having an issue with this as well here

  1. Create a new project npx create-react-app test

  2. Enter project directory and install Anchor npm install @coral-xyz/anchor (^0.30.0)

  3. Add a line to App.js to import Anchor import * as anchor from "@coral-xyz/anchor"

  4. Run the project npm run start

  5. Open http://localhost:3000 in Safari browser

  6. Observe error in the browser : The superclass is not a constructor.

The error I see in the browser

1 Answer 1

0

you can see a working example with version 0.30.0 here: https://github.com/ASCorreia/anchor-fundraiser

Your Answer

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

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