greghesp/assistant-relay

npm run setup error

kpcauchi opened this issue · 1 comments

I have followed all the instructions here: https://assistantrelay.com/docs/getting-started/installation/

However, I am still getting an error on npm run setup

Here's some errors in the log:

`c:\users\kevincauchi\appdata\local\node-gyp\cache\14.16.1\include\node\openssl\ossl_typ.h(91): error C2371: 'EVP_MD': r
edefinition; different basic types (compiling source file ..\deps\grpc\src\boringssl\err_data.c) [C:\assistant-relay\no
de_modules\grpc\build\boringssl.vcxproj]

c:\assistant-relay\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(40): error C2466: cannot allocate an array of c
onstant size 0 [C:\assistant-relay\node_modules\grpc\build\boringssl.vcxproj]
c:\assistant-relay\node_modules\grpc\deps\grpc\third_party\boringssl\include\openssl\base.h(308): error C2371: 'EVP_ENC
ODE_CTX': redefinition; different basic types (compiling source file ..\deps\grpc\third_party\boringssl\crypto\asn1\a_b
itstr.c) [C:\assistant-relay\node_modules\grpc\build\boringssl.vcxproj]

gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.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:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Windows_NT 10.0.22000
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=C:\assistant-relay\node_modules\grpc\src\node\extension_binary\node-v83-win32-x64-unknown\grpc_node.node" "--module_name=grpc_node" "--module_path=C:\assistant-relay\node_modules\grpc\src\node\extension_binary\node-v83-win32-x64-unknown" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"
gyp ERR! cwd C:\assistant-relay\node_modules\grpc
gyp ERR! node -v v14.16.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build 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 build --fallback-to-build --library=static_library --module=C:\assistant-relay\node_modules\grpc\src\node\extension_binary\node-v83-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=C:\assistant-relay\node_modules\grpc\src\node\extension_binary\node-v83-win32-x64-unknown --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
node-pre-gyp ERR! stack at ChildProcess. (C:\assistant-relay\node_modules\grpc\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1048:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
node-pre-gyp ERR! System Windows_NT 10.0.22000
node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\assistant-relay\node_modules\grpc\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd C:\assistant-relay\node_modules\grpc
node-pre-gyp ERR! node -v v14.16.1
node-pre-gyp ERR! node-pre-gyp -v v0.14.0
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --library=static_library --module=C:\assistant-relay\node_modules\grpc\src\node\extension_binary\node-v83-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=C:\assistant-relay\node_modules\grpc\src\node\extension_binary\node-v83-win32-x64-unknown --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
npm WARN assistant-relay@3.3.2 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc@1.24.2 install: node-pre-gyp install --fallback-to-build --library=static_library
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc@1.24.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\KevinCauchi\AppData\Roaming\npm-cache_logs\2022-02-27T17_32_00_342Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! assistant-relay@3.3.2 setup: npm i -g pm2 && npm i
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the assistant-relay@3.3.2 setup script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\KevinCauchi\AppData\Roaming\npm-cache_logs\2022-02-27T17_32_00_368Z-debug.log

`

I had a similar problem. I switched my node version, went from 17.6.0 --> 8.17.0
This fixed it for me. I am not sure why since the documentation suggest that Node.js version >= 10.13.0

It might work with other Node.js version, I have not tested all of them.