Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing --global windows-build-tools never completes

I am trying to install --global windows-build-tools by running below command

npm install --global windows-build-tools -verbose

No matter if I try through PowerShell or CMD (both as Administrator), the installation gets stuck in the same step.

npm info run [email protected] postinstall node_modules/windows-build-tools node ./dist/index.js [##################] | reify:resolve: info run [email protected] postinstall node_modules/windows-build-tools node ./dist/index.js

Is there a reason why this might not complete?

like image 824
user3587624 Avatar asked May 07 '26 05:05

user3587624


2 Answers

According to the windows-build-tools repo

Please note that the official Node.js for Windows installer can now automatically install the required tools. That's likely a much better option than the module listed here (windows-build-tools).

recommended approach:

  1. Go to node-download-page
  2. Download LTS version for windows
  3. Follow the installation instructions
  4. When you got to this window, check the checkbox
  5. After the installation it will prompt you to this window, it will automatically download the necessary dependencies gyp-installation

If you want to use this package(not recommended):

You should try to roll back to version 4.0.0

Run the command-line as administrator and try this:

npm install --global [email protected]

related question

like image 70
Yedidya Rashi Avatar answered May 09 '26 18:05

Yedidya Rashi


If you're having trouble installing windows-build-tools (which I had a problem with recently), you should roll back to version 4.0.0.

Run PowerShell as Administrator, and then type in the following command (assuming you have node and npm installed).

npm install --global [email protected]

This process can take some time, so please be patient.

Built-in Node.js Build Tools

There are built-in Node.js build tools, so it is recommended to use this. In fact, if you go on the npm or GitHub page of the windows-build-tools package, it will say that you should use the Node.js build tools.

To do this, go to the official Node.js download website, and download the LTS version. Then, run the installer. At a point in the installation, it will have a checkbox that says Automatically install the recommended tools. Make sure to check that!

When you install it, it will also install Chocolatey, and install the build tools like the windows-build-tools package.


Even though both of these work, it is recommended to use the Node.js built tools!

like image 31
Viradex Avatar answered May 09 '26 19:05

Viradex



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!