bug: npm install ionic broken behind proxy
Type: bug
Platform: mobile webview
When i run: npm install -g ionic i get the below error, no problem running npm install -g cordova. I had no problems installing and updating ionic before until now.
I been trying to solve this for 2 days now without any luck. It works at my home network both on windows and mac, but NOT on my company network. I have set the proxy in C:\Users\xxxxx.npmrc like this on my company windows pc:
proxy=http://user:[email protected]:8080 https-proxy=http://user:[email protected]:8080 strict-ssl=false
am using node version v4.2.1 and npm version 2.14.7
The issue is also discussed here: http://forum.ionicframework.com/t/ionic-and-node-sass-3-3-3-is-broken/35022
Building: C:\Program Files\nodejs\node.exe C:\Users\xxxxx\AppData\Roaming\npm\n
ode_modules\ionic\node_modules\ionic-app-lib\node_modules\node-sass\node_modules
\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --l
ibsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ 'C:\Program Files\nodejs\node.exe',
gyp verb cli 'C:\Users\xxxxx\AppData\Roaming\npm\node_modules\ionic\n
ode_modules\ionic-app-lib\node_modules\node-sass\node_modules\node-gyp\bin
\node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library=' ]
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "C:\Python34" in the PATH
gyp verb which failed Error: not found: C:\Python34
gyp verb which failed at F (C:\Users\xxxxx\AppData\Roaming\npm\node_modul
es\ionic\node_modules\ionic-app-lib\node_modules\node-sass\node_modules\node-gyp
\node_modules\which\which.js:78:19)
gyp verb which failed at E (C:\Users\xxxxx\AppData\Roaming\npm\node_modul
es\ionic\node_modules\ionic-app-lib\node_modules\node-sass\node_modules\node-gyp
\node_modules\which\which.js:82:29)
gyp verb which failed at C:\Users\xxxxx\AppData\Roaming\npm\node_modules
ionic\node_modules\ionic-app-lib\node_modules\node-sass\node_modules\node-gyp\no
de_modules\which\which.js:93:16
gyp verb which failed at FSReqWrap.oncomplete (fs.js:82:15)
gyp verb which failed C:\Python34 [Error: not found: C:\Python34]
gyp verb could not find "C:\Python34". guessing location
gyp verb ensuring that file exists: C:\Python27\python.exe
gyp verb check python version C:\Python27\python.exe -c "import platform; print
(platform.python_version());" returned: "2.7.10\r\n"
gyp verb get node dir no --target version specified, falling back to host node v
ersion: 4.2.1
gyp verb command install [ '4.2.1' ]
gyp verb install input version string "4.2.1"
gyp verb install installing version: 4.2.1
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version not already installed, continuing with install 4.2.1
gyp verb ensuring nodedir is created C:\Users\xxxxx.node-gyp\4.2.1
gyp verb created nodedir C:\Users\xxxxx.node-gyp\4.2.1
gyp http GET https://nodejs.org/download/release/v4.2.1/node-v4.2.1-headers.tar.
gz
gyp verb download using proxy url: "http://xxxxxx:[email protected]
.xx:8080/"
gyp WARN install got an error, rolling back install
gyp verb command remove [ '4.2.1' ]
gyp verb remove using node-gyp dir: C:\Users\xxxxx.node-gyp
gyp verb remove removing target version: 4.2.1
gyp verb remove removing development files for version: 4.2.1
gyp ERR! configure error
gyp ERR! stack Error: unable to verify the first certificate
gyp ERR! stack at Error (native)
gyp ERR! stack at TLSSocket. (tlswrap.js:1000:38)
gyp ERR! stack at emitNone (events.js:67:13)
gyp ERR! stack at TLSSocket.emit (events.js:166:7)
gyp ERR! stack at TLSSocket.finishInit (tls_wrap.js:567:8)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\xxxxx\AppDa
ta\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules
\node-sass\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--
libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Users\xxxxx\AppData\Roaming\npm\node_modules\ionic\node_modules
\ionic-app-lib\node_modules\node-sass
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
Build failed
npm WARN engine [email protected]: wanted: {"node":"~0.10.x"} (current: {"node":"
4.2.1","npm":"2.14.7"})
npm WARN engine [email protected]: wanted: {"node":"0.8.x || 0.10.x"} (current: {
"node":"4.2.1","npm":"2.14.7"})
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs
node_modules\npm\bin\npm-cli.js" "install" "-g" "cordova" "ionic"
npm ERR! node v4.2.1
npm ERR! npm v2.14.7
npm ERR! code ELIFECYCLE
npm ERR! [email protected] postinstall: node scripts/build.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] postinstall script 'node scripts/build.js '. npm ERR! This is most likely a problem with the node-sass package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node scripts/build.js npm ERR! You can get their info via: npm ERR! npm owner ls node-sass npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! C:\Users\xxxxx\npm-debug.log
This issue was moved to driftyco/ionic-cli#626