react-clear-cache icon indicating copy to clipboard operation
react-clear-cache copied to clipboard

Error in Nesxtjs

Open mohammadshayegh opened this issue 5 years ago • 3 comments

I try to use this package in my react/nextjs project but it throws this error: “SyntaxError: Unexpected token < in JSON at position 0”.

import { Index } from "./containers/index";
import styled from "styled-components";
import { useClearCache } from "react-clear-cache";

export const IndexPage= () => {
      const { isLatestVersion, emptyCacheStorage } = useClearCache();
      return isLatestVersion  ? <Index /> : emptyCacheStorage();
}

mohammadshayegh avatar Jul 30 '20 06:07 mohammadshayegh

in my project have the same problem. this component have any problem with nextjs? hope they can help with this error

emege93 avatar Dec 02 '20 11:12 emege93

Hi, thank you for reporting this one. I haven't tested this out with nextjs. Maybe you guys can help to contribute and it would be greatly appreciated for those who are using nextjs too.

nucab avatar Dec 15 '20 15:12 nucab

the same problem. Someone handled it?

AlenaProvotorova avatar Jun 09 '22 15:06 AlenaProvotorova