nwjs/npm-installer

node scripts/install.js not working behind proxy

flopes89 opened this issue · 3 comments

Environment:

  • Windows 7x64
  • HTTP_PROXY and HTTPS_PROXY environment variabes are set and confirmed to work with npm
  • node 4.5.0
$ npm version
{ npm: '4.4.1',        
  ares: '1.10.1-DEV',  
  http_parser: '2.7.0',
  icu: '56.1',         
  modules: '46',       
  node: '4.5.0',       
  openssl: '1.0.2h',   
  uv: '1.9.1',         
  v8: '4.5.103.37',    
  zlib: '1.2.8' }      

package.json file

{
  "devDependencies": {
    "nw": "^0.21.3",
    "nw-builder": "^3.2.0"
  }
}

Error message:

> nw@0.21.3 postinstall e:\tmp\nw-testarea\node_modules\nw
> node scripts/install.js

tunneling socket could not be established, statusCode=403
npm WARN nw-testarea No description
npm WARN nw-testarea No repository field.
npm WARN nw-testarea No license field.
npm WARN Error: EPERM: operation not permitted, scandir 'e:\tmp\nw-testarea\node_modules\parse-glob\node_modules'
npm WARN     at Error (native)
npm WARN  { [Error: EPERM: operation not permitted, scandir 'e:\tmp\nw-testarea\node_modules\parse-glob\node_modules']
npm WARN   errno: -4048,
npm WARN   code: 'EPERM',
npm WARN   syscall: 'scandir',
npm WARN   path: 'e:\\tmp\\nw-testarea\\node_modules\\parse-glob\\node_modules' }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nw@0.21.3 postinstall: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nw@0.21.3 postinstall script 'node scripts/install.js'.

Apparently this was initially reported as #12 and #15 and fixed with #16, but then regressed by #45

An hour ago I merged @nurishi's b9737cf.

We are now using download@^5.0.3, which uses caw@^2.0.0, which uses get-proxy@^1.0.1, which has some code to ensure that HTTP_PROXY and HTTPS_PROXY both work.

Does it really help? Please try nw@0.23.6-1 or nw@0.23.6-sdk-1 to verify the fix.

This issue is closed on a kind of a timeout (after a month of zero activity) and also because I believe that b9737cf has fixed it (unless someone reports it hasn't).

Sorry for the late reply @Mithgol , I was on paternity leave until now.

I can confirm it's now working as expected with both nw@0.23.6-1 and nw@0.23.6-sdk-1.