Next.js Discord

Discord Forum

getting randomly "TypeError: require.e is not a function"

Unanswered
Chinese Alligator posted this in #help-forum
Open in Discord
Chinese AlligatorOP
I have that piece of code below that was working fine but now I randomly get the error:

Unhandled Runtime Error
TypeError: require.e is not a function


Why is that and how do I fix it? it usually works fine again after a page refresh but I obviously need to fix it

code goes like below:

const Editor = dynamic(() => import('@components/article/ArticleEditor')
                              .then(mod => mod.default), 
                                {
                                  ssr: false
                                 });


where ArticleEditor meant to set up ReactQuill, something like this:

const Container = styled.div`
  width: 1200px;
  height: 200px;
  margin-bottom: 35px;
`;

const ArticleEditor = (props: IProps) =>
{
  // ....
     return (
     <Container>
        <ReactQuill
          ref={quillRef}
          modules={modules}
          value={props.value}
          onChange={props.handleChange}
          style={{ height: '100%', width: '100%' }}
        />
    </Container>
  )

0 Replies