Downloading installers failed. Error: TypeError: 'process.env' only accepts a configurable, writable, and enumerable data descriptor.
I have run this command npm install --global windows-build-tools
Node version : v18.12.0 NPM version : 8.19
I had the exact same problem.
First I tried to do npm install --global --production windows-build-tools@4.0.0
but didn't work then npm config set msvs_version 2022
but still didn't work.
Finally I tried to download node version 17.9.1 and retried the command and it worked!!
So here are the steps:
Step 1: uninstall Node version 18.12 and install version 17.9.1
Step 2: Search %temp% under window search bar (Copy %temp% then press windows button + Ctrl V)
Step 3: Create 'dd_client_.log.txt' and enter 'Closing installer. Return code: 3010.'
after that you should be able to finish the whole process with npm install --global windows-build-tools
big thanks to seantsang
Between I have no Idea if the technique of seantsang work directly when installing windows-build-tools with node.js version 18.12 . If what I said didn't help, maybe try this