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

npm install fails #170

Open
georgi-huklev opened this issue Mar 21, 2020 · 1 comment
Open

npm install fails #170

georgi-huklev opened this issue Mar 21, 2020 · 1 comment

Comments

@georgi-huklev
Copy link

Here is what I am getting:

PS C:\Users\georg\repos\whatsapp-desktop-dark> node --version
v12.16.1
PS C:\Users\georg\repos\whatsapp-desktop-dark> npm --version
6.13.4
PS C:\Users\georg\repos\whatsapp-desktop-dark> npm install

> [email protected] postinstall C:\Users\georg\repos\whatsapp-desktop-dark\node_modules\resourcehacker
> node scripts/install.js

Downloading ResourceHacker by Angus Johnson...
_http_client.js:140
  let expectedProtocol = defaultAgent.protocol;
                                      ^

TypeError: Cannot read property 'protocol' of undefined
    at new ClientRequest (_http_client.js:140:39)
    at request (http.js:46:10)
    at Object.get (http.js:50:15)
    at Object.<anonymous> (C:\Users\georg\repos\whatsapp-desktop-dark\node_modules\resourcehacker\scripts\install.js:23:20)
    at Module._compile (internal/modules/cjs/loader.js:1158:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
    at Module.load (internal/modules/cjs/loader.js:1002:32)
    at Function.Module._load (internal/modules/cjs/loader.js:901:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
    at internal/main/run_main_module.js:18:47
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall 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\georg\AppData\Roaming\npm-cache\_logs\2020-03-21T21_18_22_745Z-debug.log
PS C:\Users\georg\repos\whatsapp-desktop-dark>

Tried on Windows 10 and Ubuntu 18.04. Same error.

@jellydn
Copy link

jellydn commented Mar 28, 2020

Hi there, I ran into this issue and found the root cause from felicienfrancois/node-resourcehacker#6
If you downgrade to nodejs to v8 then it should work.

 ✝  ~/Projects/whatsapp-desktop-dark   master±  node -v
v8.17.0
 ✝  ~/Projects/whatsapp-desktop-dark   master±  npm -v
6.13.4
 ✝  ~/Projects/whatsapp-desktop-dark   master±  npm i
audited 2630 packages in 3.482s

1 package is looking for funding
  run `npm fund` for details

found 3 vulnerabilities (1 moderate, 2 high)
  run `npm audit fix` to fix them, or `npm audit` for details

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