openziti / ziti-sdk-nodejs

An SDK for embedding zero trust into Node.JS applications and web servers to improve security.
Apache License 2.0
72 stars 3 forks source link

Windows install errors #69

Closed andywillis closed 1 year ago

andywillis commented 1 year ago

Hi. I've been unable to get this to install on Windows and could do with some assistance.

I have tried the following:

With Python & windows build tools:

It's always seems to error out at the same place:

68 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:63:27)
68 verbose stack     at ChildProcess.emit (node:events:513:28)
68 verbose stack     at maybeClose (node:internal/child_process:1100:16)
68 verbose stack     at Socket.<anonymous> (node:internal/child_process:458:11)
68 verbose stack     at Socket.emit (node:events:513:28)
68 verbose stack     at Pipe.<anonymous> (node:net:301:12)

and

79 error node-pre-gyp http GET https://ziti-npm.s3.amazonaws.com/ziti_sdk_nodejs/v0.13.3/Release/ziti_sdk_nodejs-v0.13.3-node-v93-win32-x64.tar.gz

If anyone can offer any advice I would be grateful.

I've included a full log file (Windows/NodeJs standalone/v16.20.2) below.

Thanks

0 verbose cli C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js
1 info using npm@8.19.4
2 info using node@v16.20.2
3 timing npm:load:whichnode Completed in 1ms
4 timing config:load:defaults Completed in 3ms
5 timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc Completed in 14ms
6 timing config:load:builtin Completed in 14ms
7 timing config:load:cli Completed in 2ms
8 timing config:load:env Completed in 3ms
9 timing config:load:file:C:\Users\accou\Development\Temp\openziti\.npmrc Completed in 1ms
10 timing config:load:project Completed in 3ms
11 timing config:load:file:C:\Users\accou\.npmrc Completed in 1ms
12 timing config:load:user Completed in 1ms
13 timing config:load:file:C:\Users\accou\AppData\Roaming\npm\etc\npmrc Completed in 0ms
14 timing config:load:global Completed in 1ms
15 timing config:load:validate Completed in 1ms
16 timing config:load:credentials Completed in 2ms
17 timing config:load:setEnvs Completed in 2ms
18 timing config:load Completed in 33ms
19 timing npm:load:configload Completed in 33ms
20 timing npm:load:mkdirpcache Completed in 1ms
21 timing npm:load:mkdirplogs Completed in 0ms
22 verbose title npm i @openziti/ziti-sdk-nodejs
23 verbose argv "i" "@openziti/ziti-sdk-nodejs"
24 timing npm:load:setTitle Completed in 2ms
25 timing config:load:flatten Completed in 6ms
26 timing npm:load:display Completed in 9ms
27 verbose logfile logs-max:10 dir:C:\Users\accou\AppData\Local\npm-cache\_logs
28 verbose logfile C:\Users\accou\AppData\Local\npm-cache\_logs\2023-10-19T18_25_56_940Z-debug-0.log
29 timing npm:load:logFile Completed in 10ms
30 timing npm:load:timers Completed in 0ms
31 timing npm:load:configScope Completed in 0ms
32 timing npm:load Completed in 58ms
33 timing arborist:ctor Completed in 1ms
34 silly logfile done cleaning log files
35 timing idealTree:init Completed in 106ms
36 timing idealTree:userRequests Completed in 3ms
37 silly idealTree buildDeps
38 silly fetch manifest @openziti/ziti-sdk-nodejs@*
39 verbose shrinkwrap failed to load node_modules/.package-lock.json out of date, updated: node_modules/@openziti
40 http fetch GET 200 https://registry.npmjs.org/@openziti%2fziti-sdk-nodejs 2030ms (cache revalidated)
41 silly placeDep ROOT @openziti/ziti-sdk-nodejs@0.13.3 OK for: openziti@1.0.0 want: *
42 timing idealTree:#root Completed in 2045ms
43 timing idealTree:node_modules/@openziti/ziti-sdk-nodejs Completed in 0ms
44 timing idealTree:buildDeps Completed in 2047ms
45 timing idealTree:fixDepFlags Completed in 1ms
46 timing idealTree Completed in 2160ms
47 timing reify:loadTrees Completed in 2162ms
48 timing reify:diffTrees Completed in 10ms
49 silly reify moves {}
50 timing reify:retireShallow Completed in 2ms
51 timing reify:createSparse Completed in 5ms
52 timing reify:loadBundles Completed in 0ms
53 silly audit bulk request {
53 silly audit   '@mapbox/node-pre-gyp': [ '1.0.11' ],
53 silly audit   abbrev: [ '1.1.1' ],
53 silly audit   'agent-base': [ '6.0.2' ],
53 silly audit   'ansi-regex': [ '5.0.1' ],
53 silly audit   aproba: [ '2.0.0' ],
53 silly audit   'are-we-there-yet': [ '2.0.0' ],
53 silly audit   'balanced-match': [ '1.0.2' ],
53 silly audit   'brace-expansion': [ '1.1.11' ],
53 silly audit   chownr: [ '2.0.0' ],
53 silly audit   'color-support': [ '1.1.3' ],
53 silly audit   'concat-map': [ '0.0.1' ],
53 silly audit   'console-control-strings': [ '1.1.0' ],
53 silly audit   debug: [ '4.3.4' ],
53 silly audit   delegates: [ '1.0.0' ],
53 silly audit   'detect-libc': [ '2.0.2' ],
53 silly audit   'emoji-regex': [ '8.0.0' ],
53 silly audit   'fs-minipass': [ '2.1.0' ],
53 silly audit   minipass: [ '3.3.6', '5.0.0' ],
53 silly audit   'fs.realpath': [ '1.0.0' ],
53 silly audit   gauge: [ '3.0.2' ],
53 silly audit   glob: [ '7.2.3' ],
53 silly audit   'has-unicode': [ '2.0.1' ],
53 silly audit   'https-proxy-agent': [ '5.0.1' ],
53 silly audit   inflight: [ '1.0.6' ],
53 silly audit   inherits: [ '2.0.4' ],
53 silly audit   'is-fullwidth-code-point': [ '3.0.0' ],
53 silly audit   'lru-cache': [ '6.0.0' ],
53 silly audit   'make-dir': [ '3.1.0' ],
53 silly audit   semver: [ '6.3.1', '7.5.4' ],
53 silly audit   minimatch: [ '3.1.2' ],
53 silly audit   minizlib: [ '2.1.2' ],
53 silly audit   mkdirp: [ '1.0.4' ],
53 silly audit   ms: [ '2.1.2' ],
53 silly audit   'node-fetch': [ '2.7.0' ],
53 silly audit   nopt: [ '5.0.0' ],
53 silly audit   npmlog: [ '5.0.1' ],
53 silly audit   'object-assign': [ '4.1.1' ],
53 silly audit   once: [ '1.4.0' ],
53 silly audit   'path-is-absolute': [ '1.0.1' ],
53 silly audit   'readable-stream': [ '3.6.2' ],
53 silly audit   rimraf: [ '3.0.2' ],
53 silly audit   'safe-buffer': [ '5.2.1' ],
53 silly audit   'set-blocking': [ '2.0.0' ],
53 silly audit   'signal-exit': [ '3.0.7' ],
53 silly audit   string_decoder: [ '1.3.0' ],
53 silly audit   'string-width': [ '4.2.3' ],
53 silly audit   'strip-ansi': [ '6.0.1' ],
53 silly audit   tar: [ '6.2.0' ],
53 silly audit   tr46: [ '0.0.3' ],
53 silly audit   'util-deprecate': [ '1.0.2' ],
53 silly audit   'webidl-conversions': [ '3.0.1' ],
53 silly audit   'whatwg-url': [ '5.0.0' ],
53 silly audit   'wide-align': [ '1.1.5' ],
53 silly audit   wrappy: [ '1.0.2' ],
53 silly audit   yallist: [ '4.0.0' ],
53 silly audit   '@openziti/ziti-sdk-nodejs': [ '0.13.3' ]
53 silly audit }
54 timing reifyNode:node_modules/@openziti/ziti-sdk-nodejs Completed in 228ms
55 timing reify:unpack Completed in 229ms
56 timing reify:unretire Completed in 0ms
57 timing build:queue Completed in 2ms
58 info run @openziti/ziti-sdk-nodejs@0.13.3 install node_modules/@openziti/ziti-sdk-nodejs node-pre-gyp install --fallback-to-build
59 http fetch POST 200 https://registry.npmjs.org/-/npm/v1/security/advisories/bulk 371ms
60 timing auditReport:getReport Completed in 377ms
61 silly audit report {}
62 timing auditReport:init Completed in 1ms
63 timing reify:audit Completed in 379ms
64 info run @openziti/ziti-sdk-nodejs@0.13.3 install { code: 1, signal: null }
65 timing reify:rollback:createSparse Completed in 31ms
66 timing reify:rollback:retireShallow Completed in 0ms
67 timing command:i Completed in 7251ms
68 verbose stack Error: command failed
68 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\promise-spawn\lib\index.js:63:27)
68 verbose stack     at ChildProcess.emit (node:events:513:28)
68 verbose stack     at maybeClose (node:internal/child_process:1100:16)
68 verbose stack     at Socket.<anonymous> (node:internal/child_process:458:11)
68 verbose stack     at Socket.emit (node:events:513:28)
68 verbose stack     at Pipe.<anonymous> (node:net:301:12)
69 verbose pkgid @openziti/ziti-sdk-nodejs@0.13.3
70 verbose cwd C:\Users\accou\Development\Temp\openziti
71 verbose Windows_NT 10.0.19045
72 verbose node v16.20.2
73 verbose npm  v8.19.4
74 error code 1
75 error path C:\Users\accou\Development\Temp\openziti\node_modules\@openziti\ziti-sdk-nodejs
76 error command failed
77 error command C:\Windows\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build
78 error Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\accou\Development\Temp\openziti\node_modules\@openziti\ziti-sdk-nodejs\build\Release\node-v93-win32-x64\ziti_sdk_nodejs.node --module_name=ziti_sdk_nodejs --module_path=C:\Users\accou\Development\Temp\openziti\node_modules\@openziti\ziti-sdk-nodejs\build\Release\node-v93-win32-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
79 error node-pre-gyp info it worked if it ends with ok
79 error node-pre-gyp info using node-pre-gyp@1.0.11
79 error node-pre-gyp info using node@16.20.2 | win32 | x64
79 error node-pre-gyp info check checked for "C:\Users\accou\Development\Temp\openziti\node_modules\@openziti\ziti-sdk-nodejs\build\Release\node-v93-win32-x64\ziti_sdk_nodejs.node" (not found)
79 error node-pre-gyp http GET https://ziti-npm.s3.amazonaws.com/ziti_sdk_nodejs/v0.13.3/Release/ziti_sdk_nodejs-v0.13.3-node-v93-win32-x64.tar.gz
79 error node-pre-gyp ERR! install response status 403 Forbidden on https://ziti-npm.s3.amazonaws.com/ziti_sdk_nodejs/v0.13.3/Release/ziti_sdk_nodejs-v0.13.3-node-v93-win32-x64.tar.gz 
79 error node-pre-gyp WARN Pre-built binaries not installable for @openziti/ziti-sdk-nodejs@0.13.3 and node@16.20.2 (node-v93 ABI, unknown) (falling back to source compile with node-gyp) 
79 error node-pre-gyp WARN Hit error response status 403 Forbidden on https://ziti-npm.s3.amazonaws.com/ziti_sdk_nodejs/v0.13.3/Release/ziti_sdk_nodejs-v0.13.3-node-v93-win32-x64.tar.gz 
79 error gyp info it worked if it ends with ok
79 error gyp info using node-gyp@9.1.0
79 error gyp info using node@16.20.2 | win32 | x64
79 error gyp info ok 
79 error gyp info it worked if it ends with ok
79 error gyp info using node-gyp@9.1.0
79 error gyp info using node@16.20.2 | win32 | x64
79 error gyp info find Python using Python version 3.11.1 found at "C:\Users\accou\AppData\Local\Programs\Python\Python311\python.exe"
79 error gyp info find VS using VS2019 (16.11.34114.132) found at:
79 error gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"
79 error gyp info find VS run with --verbose for detailed information
79 error gyp info spawn C:\Users\accou\AppData\Local\Programs\Python\Python311\python.exe
79 error gyp info spawn args [
79 error gyp info spawn args   'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
79 error gyp info spawn args   'binding.gyp',
79 error gyp info spawn args   '-f',
79 error gyp info spawn args   'msvs',
79 error gyp info spawn args   '-I',
79 error gyp info spawn args   'C:\\Users\\accou\\Development\\Temp\\openziti\\node_modules\\@openziti\\ziti-sdk-nodejs\\build\\config.gypi',
79 error gyp info spawn args   '-I',
79 error gyp info spawn args   'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
79 error gyp info spawn args   '-I',
79 error gyp info spawn args   'C:\\Users\\accou\\AppData\\Local\\node-gyp\\Cache\\16.20.2\\include\\node\\common.gypi',
79 error gyp info spawn args   '-Dlibrary=shared_library',
79 error gyp info spawn args   '-Dvisibility=default',
79 error gyp info spawn args   '-Dnode_root_dir=C:\\Users\\accou\\AppData\\Local\\node-gyp\\Cache\\16.20.2',
79 error gyp info spawn args   '-Dnode_gyp_dir=C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp',
79 error gyp info spawn args   '-Dnode_lib_file=C:\\\\Users\\\\accou\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\16.20.2\\\\<(target_arch)\\\\node.lib',
79 error gyp info spawn args   '-Dmodule_root_dir=C:\\Users\\accou\\Development\\Temp\\openziti\\node_modules\\@openziti\\ziti-sdk-nodejs',
79 error gyp info spawn args   '-Dnode_engine=v8',
79 error gyp info spawn args   '--depth=.',
79 error gyp info spawn args   '--no-parallel',
79 error gyp info spawn args   '--generator-output',
79 error gyp info spawn args   'C:\\Users\\accou\\Development\\Temp\\openziti\\node_modules\\@openziti\\ziti-sdk-nodejs\\build',
79 error gyp info spawn args   '-Goutput_dir=.'
79 error gyp info spawn args ]
79 error gyp: Call to 'date' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
79 error gyp ERR! configure error 
79 error gyp ERR! stack Error: `gyp` failed with exit code: 1
79 error gyp ERR! stack     at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:284:16)
79 error gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
79 error gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)
79 error gyp ERR! System Windows_NT 10.0.19045
79 error gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\accou\\Development\\Temp\\openziti\\node_modules\\@openziti\\ziti-sdk-nodejs\\build\\Release\\node-v93-win32-x64\\ziti_sdk_nodejs.node" "--module_name=ziti_sdk_nodejs" "--module_path=C:\\Users\\accou\\Development\\Temp\\openziti\\node_modules\\@openziti\\ziti-sdk-nodejs\\build\\Release\\node-v93-win32-x64" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v93"
79 error gyp ERR! cwd C:\Users\accou\Development\Temp\openziti\node_modules\@openziti\ziti-sdk-nodejs
79 error gyp ERR! node -v v16.20.2
79 error gyp ERR! node-gyp -v v9.1.0
79 error gyp ERR! not ok 
79 error node-pre-gyp ERR! build error 
79 error node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\accou\Development\Temp\openziti\node_modules\@openziti\ziti-sdk-nodejs\build\Release\node-v93-win32-x64\ziti_sdk_nodejs.node --module_name=ziti_sdk_nodejs --module_path=C:\Users\accou\Development\Temp\openziti\node_modules\@openziti\ziti-sdk-nodejs\build\Release\node-v93-win32-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93' (1)
79 error node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\accou\Development\Temp\openziti\node_modules\@mapbox\node-pre-gyp\lib\util\compile.js:89:23)
79 error node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
79 error node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1100:16)
79 error node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
79 error node-pre-gyp ERR! System Windows_NT 10.0.19045
79 error node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\accou\\Development\\Temp\\openziti\\node_modules\\@mapbox\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
79 error node-pre-gyp ERR! cwd C:\Users\accou\Development\Temp\openziti\node_modules\@openziti\ziti-sdk-nodejs
79 error node-pre-gyp ERR! node -v v16.20.2
79 error node-pre-gyp ERR! node-pre-gyp -v v1.0.11
79 error node-pre-gyp ERR! not ok
80 verbose exit 1
81 timing npm Completed in 7666ms
82 verbose unfinished npm timer reify 1697739957239
83 verbose unfinished npm timer reify:build 1697739959678
84 verbose unfinished npm timer build 1697739959678
85 verbose unfinished npm timer build:deps 1697739959678
86 verbose unfinished npm timer build:run:install 1697739959680
87 verbose unfinished npm timer build:run:install:node_modules/@openziti/ziti-sdk-nodejs 1697739959681
rentallect commented 1 year ago

Hi @andywillis

We are currently in the middle of efforts related to releasing the next version of the NodeJS SDK. Once that becomes available, Windows installs of the SDK should start working again. I'll ping you back here once the new release is available.

rentallect commented 1 year ago

@andywillis we have released version 0.14.1 of this SDK, which has Windows support for Node 16, 18, 19, and 20. You should now be able to npm i or yarn add from your Windows machine. I will now close this issue. Please reopen if you experience any trouble.