How the registration is handled with a custom credential provider ( email + password)? Currently my […nextauth].js looks like this: All tutorials I found online only shows the login/signIn without details on how to implement registration Answer Registration is the process of registering the user, saving new users’ credentials into the database. It is independent of next-auth. You create a
Tag: next.js
ReactJS/CSS: How to set div height based on other element height?
I’m trying to set an fixed height to a div, to force the overflow scroll. The problem is, I’m doing this with JavaScript, inside a useEffect hook, but it’s not working well. Sometimes the height it’s set well, but at the most times is wrong. I created a function inside the component, then, call it inside a useEffect hook: Seems
use getStaticProps in component
I started a project with next js and typescript. I have a main component that I call it in the index.js page I use the getStaticProps function in the main component getStaticProps returns a prop object and when I log this prop in my main component I received undefined in my console. I want to know using the getStaticProps in
Nextjs static files CORS issue – Causing links to break on version 10.1.4
My current Nextjs app is pulling its static files from Cloudfront. (I upload the /static folder to S3 during the deployment) Since updating to version 9 I am facing a weird issue where some of my CSS files are getting the following CORS error: After updating Nextjs to version 10.1.4, all the links of the app stopped working. This is
Ant Design does not work in react js project
in this code.. Ant Design Row, Col Component does not work.. my first time to use ant design.. I don’t know how to figure it out.. I add result screen! And I hope Hello World is in one line! I’m really appreciated for your kind help! Thank you Answer The code looks alright to me. My guess is you forgot
`throw new Error(‘Failed to load static props’)` when setting `fallback: true` in `getStaticPaths` in Next.JS
Refer to discussion here. I faced similar error. Everything worked fine when fallback is set to false. However, when fallback is set to true, next js throws error Answer After lot of searching and trial and error, I found out that the error was because of the exceptions throws inside getStaticProps. To solve this issue all I did is to
How can I use Bootstrap 5 with Next.js?
After installing bootstrap with npm install bootstrap I added the style to /pages/_app.js like so: However anything from it that uses javascript does not work at all, e.g. the Collapse example from their docs. If I add import ‘bootstrap/dist/js/bootstrap.js’ to /pages/_app.js then it starts “working” as expected, until a page reload in which it says ReferenceError: document is not defined
Next.js – Expected server HTML to contain a matching in
Live example available here I’m trying to make a basic layout where, on mobiles, only the latest posts appear. On desktop, the left column should be the posts and the right column the top categories and most popular posts. Here is the layout: Here’s the useScreenType hook: And I keep getting this error: Now I think the issue is due
NextJS load external image Amazon
There is a specific url on amazon that stores some images on s3 that the amazon domain in question is already configured on the domain in next.config.js, but does not load on the front. If I put any external url, unsplah or other, it loads normally. The url in question is: idinheiro-admin-images.s3.sa-east-1.amazonaws.com And the error that occurs on the console
nextjs has some exclusive functionality for vercel only
I’m migrating all my applications to nextjs framework! and I would like to know, if all the functionality of nextjs is possible to replicate on private dockers servers or any type of jamstack itself or some functionality is limited only to the vercel platform Answer you can replicate all the functionality of nextjs in private applications such as docker k8s