0

In spfx when I load the default reactjs template, I get this

enter image description here

Anyone know whats wrong?

1 Answer 1

2

I guess you have probably solved this in the meantime, but for others coming across this post like I did today:

This seems to be an issue with the latest TypeScript Version that might have probably been updated.

Details here: https://dreamsof.dev/2020-09-21-typescript-upgrade-breaking-dataversion-get-override-spfx11/

And in short:

Either fix it by using an older version of TypeScript

Within Visual Studio Code; press [F1] -> type “TypeScript” -> select “TypeScript: Select TypeScript version…”

or add ts-ignore on top of the code:

  // @ts-ignore
  protected get dataVersion(): Version {
    return Version.parse('1.0');
  }
1
  • Using the older version of typescript (v3 or 3.3) should fix it, but this ts-ignore is a good temp workaround.
    – omega
    Commented Oct 22, 2020 at 17:50

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.