Elias Ferede
Elias Ferede

Reputation: 441

For npm dependencies, PowerShell is stuck after installing VS Build tools and it says it is still waiting for installer log file to install python?

The command I used (run as administrator):

npm install --global --production windows-build-tools

screen shot

Upvotes: 34

Views: 38362

Answers (6)

Nisal Gunawardana
Nisal Gunawardana

Reputation: 1455

OS: Windows 11 Pro

Tried these, but any of them didn't work for me:

  • npm install --global windows-build-tools
  • npm install --global [email protected]
  • npm install --global [email protected]
  • npm install --global --production windows-build-tools
  • npm install --global --production [email protected]
  • npm install --global --production [email protected]
  • npm config set msvs_version 2015 global
  • npm config set msvs_version 2017 global

Then Install Chocolatey https://chocolatey.org/install

Followd this resource: https://github.com/felixrieseberg/windows-build-tools/issues/172#issuecomment-824916268

$ choco install python visualstudio2017-workload-vctools -y
$ npm config set msvs_version 2017

Got this error when run $ npm i

Error: 'cmake' is not recognized as an internal or external command,   operable program or batch file.

Solution:

$ choco uninstall cmake
$ choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System'

Now I don't get any errors when run $ npm i

Upvotes: 0

dzona
dzona

Reputation: 3751

Another option is to try installing the build tools via Chocolatey instead (use an Administrator command line):

choco install python visualstudio2017-workload-vctools -y

Credits to karlhorky

Upvotes: 1

Gajanan Kulkarni
Gajanan Kulkarni

Reputation: 693

Spot On!!

You can simply hit below command:

npm install --global [email protected]

It will work for sure. Thanks

Upvotes: 3

LJD
LJD

Reputation: 496

I was experiencing this issue and solved it by following this guide: https://spin.atomicobject.com/2019/03/27/node-gyp-windows/

Upvotes: 1

Venkatesh Machineni
Venkatesh Machineni

Reputation: 469

I also faced the same problem and I tried with the below command, it worked.

npm install --global --production [email protected]

Regards, venkatesh.

Upvotes: 39

liuliang
liuliang

Reputation: 422

I am running into the issue above. After google, I luckily find a related thread on github about how to resolve stuck when installing windows-build-tool with npm from powershell on Windows. The following are a bunch of screenshots.

screenshot

Upvotes: 3

Related Questions