next.js
3ceab0e7 - fix: specify supported nodejs version range (#72087)

Commit
1 year ago
fix: specify supported nodejs version range (#72087) ### Why? - Next.js uses [AsyncLocalStorage.snapshot](https://github.com/vercel/next.js/blob/c32e2802097c03fd9f95b1dae228d6e0257569c0/packages/next/src/server/app-render/async-local-storage.ts#L60) function. - `AsyncLocalStorage.snapshot` [was added in](https://nodejs.org/api/async_context.html#static-method-asynclocalstoragesnapshot) Node.js `19.8.0`, `18.16.0`. - However, the supported Node.js version range was `>= 18.18.0`. - Which allowed Node.js `< 19.8.0` to be used, and causing an error: ![image](https://github.com/user-attachments/assets/c76b9ce2-c9e1-46c6-a472-d5268de76ff9) > Image Source: https://x.com/smakosh/status/1851565997804667253 ### How? Modified the version range as `"^18.18.0 || ^19.8.0 || >= 20.0.0"`. Confirmed that >= 20 are fully compatible so far. ### Things to Consider Should we limit the upper to prevent deprecated/breaking changes? If so, what would be the suitable upper-limit version?
Author
Parents
Loading