cli icon indicating copy to clipboard operation
cli copied to clipboard

Install fails on Windows 10

Open mattmazzola opened this issue 7 years ago • 3 comments

Looks like something is trying to find a specific version windows sdk to build a package for windows platform. It is looking for Windows 8.1 but I have Windows 10 which must use different version of SDK that installer is unaware of.

I've had this issue on other packages like phantomjs and they usually have pre-built binaries for the target platform. Is there a separate package that is specifically for Windows?

Log output:

C:\Windows\system32> npm install -g semantic-release-cli
npm WARN deprecated [email protected]: Use uuid module instead
C:\Users\mattm\AppData\Roaming\npm\semantic-release-cli -> C:\Users\mattm\AppData\Roaming\npm\node_modules\semantic-release-cli\bin\semantic-release.js

> [email protected] install C:\Users\mattm\AppData\Roaming\npm\node_modules\semantic-release-cli\node_modules\keytar
> node-gyp rebuild


C:\Users\mattm\AppData\Roaming\npm\node_modules\semantic-release-cli\node_modules\keytar>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\PlatformToolsets\v140\Toolset.targets(36,5): error
 MSB8036: The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK vers
ion in the project property pages or by right-clicking the solution and selecting "Retarget solution". [C:\Users\mattm\
AppData\Roaming\npm\node_modules\semantic-release-cli\node_modules\keytar\build\keytar.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\mattm\AppData\Roaming\npm\node_modules\semantic-release-cli\node_modules\keytar
gyp ERR! node -v v6.3.1
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm WARN install:[email protected] [email protected] install: `node-gyp rebuild`
npm WARN install:[email protected] Exit status 1
C:\Users\mattm\AppData\Roaming\npm
`-- [email protected]

mattmazzola avatar Mar 25 '17 23:03 mattmazzola

node: v6.3.1 npm: 3.10.3

mattmazzola avatar Mar 25 '17 23:03 mattmazzola

Hmmm, I was able to install using WSL (Bash on Windows), but then running semantic-release setup still failed with this issue:

mattmazzola@DESKTOP-LJD93VT:/mnt/e/Repos/ts-test-package$ semantic-release setup
/usr/lib/node_modules/semantic-release/node_modules/npmconf/config-defs.js:332
  Object.keys(os.networkInterfaces()).map(function (nic) {
                 ^

Error: EINVAL: invalid argument, uv_interface_addresses
    at getLocalAddresses (/usr/lib/node_modules/semantic-release/node_modules/npmconf/config-defs.js:332:18)
    at Object.<anonymous> (/usr/lib/node_modules/semantic-release/node_modules/npmconf/config-defs.js:281:23)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/lib/node_modules/semantic-release/node_modules/npmconf/npmconf.js:4:18)

Seems there is already issue open for it: https://github.com/Microsoft/BashOnWindows/issues/468

Although still would be nice to install on windows without the using WSL

mattmazzola avatar Mar 25 '17 23:03 mattmazzola

I had no problems with npm install -g semantic-release-cli on the following config:

  • node 10.13.0
  • npm 6.4.1
  • Windows 10 10.0.17134

Via Visual Studio Installer, I verified I don't have the Windows 8.1 SDK installed: screen shot 2019-01-07 at 10 42 17 pm

Maybe internals have changed since the original issue report? I've also found native compilation on Windows to be problematic, where most problems stem from bad environment configuration. (Example: install via MSI, switch to chocolatey, then nvm .. this results in lots of dangling pieces in the environment which you don't notice until you hit node-gyp and things blow up.)

ZebraFlesh avatar Jan 08 '19 04:01 ZebraFlesh