Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deasync install script fails when NODE_EXTRA_CA_CERTS is set #152

Open
eidottermihi opened this issue Sep 9, 2021 · 1 comment
Open

Comments

@eidottermihi
Copy link

Running npm install on an project using deasync fails, when Node environment variable NODE_EXTRA_CA_CERTS is set:

$ export NODE_EXTRA_CA_CERTS=my_ca_chain.crt

$ npm install

> [email protected] install C:\Users\michael.prankl\git\appswitcher-vue\node_modules\deasync
> node ./build.js

Warning: Ignoring extra certs from `my_ca_chain.crt`, load failed: error:02001002:system library:fopen:No such file or directory
`win32-x64-node-14` exists; testing
Problem with the binary; manual build incoming
stdout=
err=null

C:\Users\michael.prankl\git\appswitcher-vue\node_modules\deasync>if not defined npm_config_node_gyp (node "C:\PROGRA~1\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\PROGRA~1\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Warning: Ignoring extra certs from `my_ca_chain.crt`, load failed: error:02001002:system library:fopen:No such file or directory
gyp ERR! find VS 
gyp ERR! find VS msvs_version not set from command line or npm config
gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - not found
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS
gyp ERR! find VS **************************************************************
gyp ERR! find VS You need to install the latest version of Visual Studio
gyp ERR! find VS including the "Desktop development with C++" workload.
gyp ERR! find VS For more information consult the documentation at:
gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
gyp ERR! find VS **************************************************************
gyp ERR! find VS
gyp ERR! configure error
gyp ERR! stack Error: Could not find any Visual Studio installation to use
gyp ERR! stack     at VisualStudioFinder.fail (C:\PROGRA~1\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
gyp ERR! stack     at C:\PROGRA~1\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\PROGRA~1\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
gyp ERR! stack     at C:\PROGRA~1\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
gyp ERR! stack     at C:\PROGRA~1\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16
gyp ERR! stack     at C:\PROGRA~1\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
gyp ERR! stack     at C:\PROGRA~1\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:315:5)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at maybeClose (internal/child_process.js:1048:16)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "C:\\PROGRA~1\\nodejs\\node.exe" "C:\\PROGRA~1\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\michael.prankl\git\appswitcher-vue\node_modules\deasync
gyp ERR! node -v v14.16.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
Build failed

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node ./build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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\michael.prankl\AppData\Roaming\npm-cache\_logs\2021-09-09T12_29_18_297Z-debug.log

Notes:

  • when running without NODE_EXTRA_CA_CERTS everything is working fine
  • my_ca_chain.crt CA file exists and is fine
@JadoJodo
Copy link

JadoJodo commented Feb 9, 2022

Oddly enough, I'm having this same issue (albeit with a different setup). I'm running a Caddy Docker container and a NuxtJS docker container. I use the temp certs the Caddy container generates and mount them in the Nuxt container to use them for local development. In my case, I sat the NODE_EXTRA_CA_CERTS to the mounted volume path, and the deasync error is what I also see. I've since unset the env variable, and it seems to be working properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants