Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Super expression must either be null or a function On Nextjs 13 #164

Open
logivity opened this issue Dec 22, 2022 · 5 comments
Open

Comments

@logivity
Copy link

Getting above error by using simple example given.

import Typewriter from "typewriter-effect";

<Typewriter
onInit={(typewriter) => {
typewriter
.typeString("Hello World!")
.callFunction(() => {
console.log("String typed out!");
})
.pauseFor(2500)
.deleteAll()
.callFunction(() => {
console.log("All strings were deleted");
})
.start();
}}
/>

@abimnyud
Copy link

abimnyud commented Jan 7, 2023

Are you using the appDir beta features? I had the same issue, I wrapped the Typewriter component and added 'use client' to it, and it works for now.

@Codered9
Copy link

Codered9 commented Jun 5, 2023

Are you using the appDir beta features? I had the same issue, I wrapped the Typewriter component and added 'use client' to it, and it's works for now

Can you elaborate please what exactly to do. I am facing the same issue.

@abimnyud
Copy link

abimnyud commented Jun 5, 2023

Are you using the appDir beta features? I had the same issue, I wrapped the Typewriter component and added 'use client' to it, and it's works for now

Can you elaborate please what exactly to do. I am facing the same issue.

You can see a working example here https://stackoverflow.com/questions/74614922/super-expression-must-either-be-null-or-a-function-nextjs-13

@kevin420eth
Copy link

Are you using the appDir beta features? I had the same issue, I wrapped the Typewriter component and added 'use client' to it, and it works for now.

Thank you! It works now!

@Poisonlocket
Copy link

Has anybody found a way to do this without the client directive? It forces my index page to be a client component even if i do it in a closed off component with the client directive and this breaks my application

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants