-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Closed
Description
URL:
Browser Name:
Edge
Browser Version:
131.0.2903.51
Operating System:
Windows 11, 24H2, 26100.2314
How to reproduce the issue:
- Open nodejs.org on Windows arm64 machine (e.g. Surface Laptop, 7th edition)
- Click Download
- At the moment of writing,
node-v22.11.0-x64.msigets downloaded.
Interestingly, https://nodejs.org/en/download/prebuilt-installer correctly recognizes my machine ARM64 and this particular download button works as expected. This button, however, receives bitness as arm64 (as opposed to just 64), from ReleaseContext, which in turn appears to be fed with correct value by BitnessDropdown right here:
nodejs.org/apps/site/components/Downloads/Release/BitnessDropdown.tsx
Lines 16 to 29 in c5345f5
| const BitnessDropdown: FC = () => { | |
| const { bitness: userBitness, architecture: userArchitecture } = | |
| useDetectOS(); | |
| const { bitness, os, release, setBitness } = useContext(ReleaseContext); | |
| const t = useTranslations(); | |
| // we also reset the bitness when the OS changes, because different OSs have | |
| // different bitnesses available | |
| useEffect(() => { | |
| setBitness(getUserBitnessByArchitecture(userArchitecture, userBitness)); | |
| // we shouldn't update the effect on setter state change | |
| // eslint-disable-next-line react-hooks/exhaustive-deps | |
| }, [userArchitecture, userBitness]); |
Metadata
Metadata
Assignees
Labels
No labels