#Next.JS tutorial chapter 1 localStorage error

1 messages · Page 1 of 1 (latest)

ebon glade
#

hi i have stated the tutorial (https://nextjs.org/learn/dashboard-app/getting-started) but when i run pnpm run dev i get this error

@ dev ****/next-js/nextjs-dashboard
next dev --turbopack

▲ Next.js 15.3.2 (Turbopack)

✓ Starting...
✓ Ready in 1316ms
○ Compiling / ...
✓ Compiled / in 3.8s
(node:74000) Warning: --localstorage-file was provided without a valid path
(Use node --trace-warnings ... to show where the warning was created)
⨯ [TypeError: localStorage.getItem is not a function] {
digest: '1943459719'
}
[TypeError: localStorage.getItem is not a function]
⨯ [TypeError: localStorage.getItem is not a function] { page: '/' }
○ Compiling /_error ...
✓ Compiled /_error in 2.2s
[TypeError: localStorage.getItem is not a function]
[TypeError: localStorage.getItem is not a function]
⨯ [TypeError: localStorage.getItem is not a function]
⨯ [TypeError: localStorage.getItem is not a function]
[TypeError: localStorage.getItem is not a function]
⨯ unhandledRejection: [TypeError: localStorage.getItem is not a function]
⨯ unhandledRejection: [TypeError: localStorage.getItem is not a function]
[TypeError: localStorage.getItem is not a function]
[TypeError: localStorage.getItem is not a function]
⨯ [TypeError: localStorage.getItem is not a function]
[TypeError: localStorage.getItem is not a function] { page: '/' }
[TypeError: localStorage.getItem is not a function]
⨯ unhandledRejection: [TypeError: localStorage.getItem is not a function]
⨯ unhandledRejection: [TypeError: localStorage.getItem is not a function]
GET / 500 in 7964ms
GET / 500 in 66ms

thank you for your help 🙂

Create a new Next.js application using the dashboard starter example and explore the project.

balmy micaBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

swift sinew
ebon glade
ebon glade
# swift sinew can you send `npx next info`

`
/bin/sh: line 1: yarn: command not found

Operating System:
Platform: linux
Arch: x64
Version: #1 SMP PREEMPT_DYNAMIC Fri, 17 Oct 2025 13:29:06 +0000
Available memory (MB): 15910
Available CPU cores: 4
Binaries:
Node: 25.0.0
npm: 11.6.2
Yarn: N/A
pnpm: 10.18.3
Relevant Packages:
next: 15.3.2 // There is a newer version (15.5.6) available, upgrade recommended!
eslint-config-next: N/A
react: 19.1.0
react-dom: 19.1.0
typescript: 5.7.3
Next.js Config:
output: N/A
⚠ There is a newer version (15.5.6) available, upgrade recommended!
Please try the latest canary version (npm install next@canary) to confirm the issue still exists before creating a new issue.
Read more - https://nextjs.org/docs/messages/opening-an-issue
`

swift sinew
#

the learn repository, or maybe perhaps next 15.3.2 doesnt yet support node 25

#

i was able to get it working in node 22

ebon glade
#

should i change it in package.json

swift sinew
#

try nvm i 24 then nvm use 24 then pnpm run dev again

ebon glade
#

nextjs-dashboard master ❯ nvm i 24
bash: command not found: nvm

swift sinew
#

u have to install nvm, to manage node versions

#

I tried updating next.js version and it works too

#

so you can also do pnpm i next@latest and re-run pnpm dev

#

if you dont want to uninstall nvm

swift sinew
#

can you... send pnpm next info ?

ebon glade
#

npm warn Unknown env config "verify-deps-before-run". This will stop working in the next major version of npm.
npm warn Unknown env config "verify-deps-before-run". This will stop working in the next major version of npm.
/bin/sh: line 1: yarn: command not found

Operating System:
Platform: linux
Arch: x64
Version: #1 SMP PREEMPT_DYNAMIC Fri, 17 Oct 2025 13:29:06 +0000
Available memory (MB): 15910
Available CPU cores: 4
Binaries:
Node: 25.0.0
npm: 11.6.2
Yarn: N/A
pnpm: 10.18.3
Relevant Packages:
next: 15.3.2 // There is a newer version (15.5.6) available, upgrade recommended!
eslint-config-next: N/A
react: 19.1.0
react-dom: 19.1.0
typescript: 5.7.3
Next.js Config:
output: N/A
⚠ There is a newer version (15.5.6) available, upgrade recommended!
Please try the latest canary version (npm install next@canary) to confirm the issue still exists before creating a new issue.
Read more - https://nextjs.org/docs/messages/opening-an-issue

swift sinew
#

what happen when you run pnpm i next@latest ?

ebon glade
#

 WARN  6 deprecated subdependencies found: are-we-there-yet@2.0.0, gauge@3.0.2, glob@7.2.3, inflight@1.0.6, npmlog@5.0.1, rimraf@3.0.2 Already up to date Progress: resolved 237, reused 212, downloaded 1, added 0, done Done in 1.8s using pnpm v10.18.3

swift sinew
#

thats weird 😭

ebon glade
#

i know i might just leave it and learn by doing 🤣

#

thank you for your help though

swift sinew
#

what im intending to do is update next version to 15.5.6

#

you can change the version in the package.json into 15.5.6
and re-run pnpm i

#

pnpm i next@latest is just a quicker way to do it

ebon glade
#

i changed it in package.json but still the same error

#

then ran pnpm i next@latest and then ran it again same error 😭

swift sinew
#

is it possible to send me a screenshot?

ebon glade
#

of the terminal?

swift sinew
#

of the workspace

#

so i can tell if its in the right directory

ebon glade
swift sinew
#

ohh dont run pnpm i next@latest after you changed it to 15.5.6

#

since it will override package.json

#

just change "next":"15.5.6" , save, then run pnpm i (without next@latest)

ebon glade
#

😭

#

omg thank you so much

#

it works

swift sinew
#

yay, good luck with learning

ebon glade
#

thank you 🙂