You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upon loading the nome page http://localhost:3000/.
I see the following error in terminal console: [ReferenceError: localStorage is not defined]
Tried with clean Next.js v15
➜ git:(main) ✗ npx create-next-app@latest example-logto
Need to install the following packages:
create-next-app@15.1.1
Ok to proceed? (y)
✔ Would you like to use TypeScript? … No / Yes
✔ Would you like to use ESLint? … No / Yes
✔ Would you like to use Tailwind CSS? … No / Yes
✔ Would you like your code inside a `src/` directory? … No / Yes
✔ Would you like to use App Router? (recommended) … No / Yes
✔ Would you like to use Turbopack for`next dev`? … No / Yes
✔ Would you like to customize the import alias (`@/*` by default)? … No / Yes
Creating a new Next.js app in /experiments/example-logto.
Using npm.
Initializing project with template: app-tw
Installing dependencies:
- react
- react-dom
- next
Installing devDependencies:
- typescript
- @types/node
- @types/react
- @types/react-dom
- postcss
- tailwindcss
- eslint
- eslint-config-next
- @eslint/eslintrc
added 371 packages, and audited 372 packages in 18s
141 packages are looking for funding
run `npm fund`for details
found 0 vulnerabilities
Success! Created example-logto at /experiments/example-logto
➜ example-logto git:(main) ✗ npm run dev
> example-logto@0.1.0 dev
> next dev
▲ Next.js 15.1.1
- Local: http://localhost:3000
- Network: http://192.168.1.129:3000
✓ Starting...
✓ Ready in 1345ms
○ Compiling / ...
✓ Compiled / in 3s (946 modules)
[ReferenceError: localStorage is not defined]
⨯ unhandledRejection: [ReferenceError: localStorage is not defined]
⨯ unhandledRejection: [ReferenceError: localStorage is not defined]
GET / 200 in 3682ms
✓ Compiled in 191ms (445 modules)
○ Compiling /favicon.ico ...
✓ Compiled /favicon.ico in 894ms (498 modules)
GET /favicon.ico 200 in 953ms
Expected behavior
No errors in terminal\ console
How to reproduce?
Kickstart the Next.js app npx create-next-app@latest
install React sdk npm i @logto/react
Add SDK as per the code above and run next js app npm run dev
Context
Logto Cloud
Screenshots
The text was updated successfully, but these errors were encountered:
Describe the bug
Upon loading the nome page
http://localhost:3000/
.I see the following error in terminal console:
[ReferenceError: localStorage is not defined]
Tried with clean Next.js v15
package.json
providers.tsx
layout.tsx
Expected behavior
No errors in terminal\ console
How to reproduce?
npx create-next-app@latest
npm i @logto/react
npm run dev
Context
Screenshots
The text was updated successfully, but these errors were encountered: