I am watching this video: https://www.youtube.com/watch?v=uGhekiErHso&lc=UgxYeO4X60SBiKSTYyp4AaABAg.9WmWFhab7UX9WmzTutWP_V, at the 39 min of the video you can see the authentication part in _app.js
.
When I import { Provider as AuthProvider } from "next-auth/client"
I got the below error:
Module not found: Package path ./client is not exported from package C:\Users\saeed\Amazon-starter-template-nextjs\node_modules\next-auth (see exports field in C:\Users\saeed\Amazon-starter-template-nextjs\node_modules\next-auth\package.json)
If I change it to: import { Provider as AuthProvider } from "next-auth/react";
I got this error:
Server Error Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.