felixrieseberg / windows-build-tools

:package: Install C++ Build Tools for Windows using npm
MIT License
3.4k stars 236 forks source link

Cannot install windows-build-tools (Ubuntu for Windows) #235

Closed MarkKocherovsky closed 3 years ago

MarkKocherovsky commented 3 years ago

I am trying to install windows build tools using npm install --global --production windows-build-tools, and Ubuntu is consistently returning an EBADPLATFORM error.

I am using Windows 10, Ubuntu for Windows 20.04.1, NodeJS version 15.6.0, and npm version 7.4.0

The error log is below:


npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for windows-build-tools@5.2.2: wanted {"os":"win32"} (current: {"os":"linux","arch":"x64"})
npm ERR! notsup Valid OS:    win32
npm ERR! notsup Valid Arch:  undefined
npm ERR! notsup Actual OS:   linux
npm ERR! notsup Actual Arch: x64

npm ERR! A complete log of this run can be found in:
npm ERR!     LOG_PATH
jacobq commented 3 years ago

Erroring with EBADPLATFORM is exactly the intended behavior of this package when it is run on platforms other than Windows. (Linux running on Windows via WSL, VMs, etc. is not Windows, does not need this, and is incompatible with this.) https://github.com/felixrieseberg/windows-build-tools/issues/56#issuecomment-762280814