aws-amplify / aws-amplify/amplify-cli

npx ampx sandbox would not work with node v25

Open
#14,572 1 comment 0 reactions 0 assignees View on GitHub
documentation p2
Dominant language
TypeScript
Stars
2.9k
Forks
825
Avg merge
11d 23h
Merged PRs (30d)
2

Description

### How did you install the Amplify CLI?

npm

### If applicable, what version of Node.js are you using?

25

### Amplify CLI Version

I dont know

### What operating system are you using?

Mac

### Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

no

### Describe the bug

I got this error when running `npx ampx sandbox`

It seems that the node version 25 would not work with this command until I switched to node v20

TypeError: localStorage.getItem is not a function
at Object. (/Users/ricardo/Developer/amplify-next-template/node_modules/@typescript/vfs/dist/vfs.cjs.development.js:30:64)
at Module._compile (node:internal/modules/cjs/loader:1760:14)
at Object..js (node:internal/modules/cjs/loader:1892:10)
at Module.load (node:internal/modules/cjs/loader:1480:32)
at Module._load (node:internal/modules/cjs/loader:1299:12)
at TracingChannel.traceSync (node:diagnostics_channel:328:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:245:24)
at Module.require (node:internal/modules/cjs/loader:1503:12)
at require (node:internal/modules/helpers:152:16)
at Object. (/Users/ricardo/Developer/amplify-next-template/node_modules/@typescript/vfs/dist/index.js:7:20)

Node.js v25.1.0

### Expected behavior

node v25 works according to the doc
https://docs.amplify.aws/nextjs/start/quickstart/nextjs-app-router-client-components/

[Node.js](https://nodejs.org/) v14.x or later
[npm](https://www.npmjs.com/) v6.14.4 or later
[git](https://git-scm.com/) v2.14.1 or later
If you are new to these technologies, we recommend you go through the official [React](https://react.dev/learn/tutorial-tic-tac-toe), [Next.js](https://nextjs.org/docs/app/getting-started), and [TypeScript](https://www.typescriptlang.org/docs/handbook/typescript-from-scratch.html) tutorials first.

### Reproduction steps

1. clone the quickstart repo
2. run the command `npx ampx sandbox`
3.

### Project Identifier

_No response_

### Log output

```
# Put your logs below this line

TypeError: localStorage.getItem is not a function
at Object. (/Users/ricardo/Developer/amplify-next-template/node_modules/@typescript/vfs/dist/vfs.cjs.development.js:30:64)
at Module._compile (node:internal/modules/cjs/loader:1760:14)
at Object..js (node:internal/modules/cjs/loader:1892:10)
at Module.load (node:internal/modules/cjs/loader:1480:32)
at Module._load (node:internal/modules/cjs/loader:1299:12)
at TracingChannel.traceSync (node:diagnostics_channel:328:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:245:24)
at Module.require (node:internal/modules/cjs/loader:1503:12)
at require (node:internal/modules/helpers:152:16)
at Object. (/Users/ricardo/Developer/amplify-next-template/node_modules/@typescript/vfs/dist/index.js:7:20)

Node.js v25.1.0

```

### Additional information

_No response_

### Before submitting, please confirm:

- [x] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- [x] I have removed any sensitive information from my code snippets and submission.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the failure with `npx ampx sandbox` on Node.js v25 using the quickstart repository. Read the stack trace in `@typescript/vfs/dist/vfs.cjs.development.js` and the related `@typescript/vfs/dist/index.js` entry point, then compare behavior with Node.js v20. Done means the sandbox command works on the documented Node.js versions, or the documentation clearly states the supported range.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.