Skip to content

Got a error while import SWR #1867

Answered by TLM-Dev
marklee1972 asked this question in Q&A
Feb 21, 2022 · 2 comments · 3 replies
Discussion options

You must be logged in to vote

I suspect it has something to do with the newer update of SWR.

I just had and solved this problem temporarily;

  • deleting my node_modules folder.
  • changing "swr": "^1.2.2" to "swr": "1.1.2" in package.json (the version of the example on their website, which is currently working).
  • running "npm install" to reinstall the packages from the packages.json file.

I can't speak for what exactly the problem is on the 1.2.2 version or how to fix it, though.
Hope this helps.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@marklee1972
Comment options

@huozhi
Comment options

Answer selected by marklee1972
Comment options

You must be logged in to vote
1 reply
@SystemDisc
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants