Ionic and node-sass@3.3.3 is broken

After trying to upgrade ionic am getting the following error. Am stuck and don’t know what to do about it. Can someone give me a little help to solve this?

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 node-gyp@3.0.3
gyp info using node@4.2.1 | 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:xxxxxx@httpproxy.xxxx.xxxxx
.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. (_tls_wrap.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 cordova-js@4.0.0: wanted: {“node”:”~0.10.x”} (current: {“node”:“
4.2.1”,“npm”:“2.14.7”})
npm WARN engine xmlbuilder@2.2.1: 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! node-sass@3.3.3 postinstall: node scripts/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@3.3.3 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

If it’s the same problem i had all i did was change "gulp-sass": "^2.0.4", in the package.json and tried again

Thx triniwiz but where do i find the file package.json? I already cleared the dir C:\Users\xxxx\AppData\Roaming\npm\node_modules trying to solve this?

If its the app you’re trying to upgrade then the package.json is located in the root folder of your app

This should be fix for both the framework and app-base.

So, I have been trying to solve an issue with gulp-sass node-sass node-gyp@3
and have tried the above and many other attempts at solutions.

My question is, what versions of the various packages should I be using?

is there a version of gulp, sass, node, and ionic that are known to work together?

My ionic info
Your system information:

Cordova CLI: 5.1.1
Gulp version: CLI version 3.9.0
Gulp local: Local version 3.9.0
Ionic CLI Version: 1.7.6
Ionic App Lib Version: 0.6.2
ios-deploy version: 1.8.2
ios-sim version: 4.1.1
OS: Mac OS X El Capitan
Node Version: v0.12.7
Xcode version: Xcode 7.0.1 Build version 7A1001

ionic $ [19:26:04] Using gulpfile ~/Code/2/gulpfile.js
[19:26:04] Starting ‘dev-config’…
[19:26:04] Finished ‘dev-config’ after 14 ms
[19:26:04] Starting ‘dev-sass’…
[19:26:04] Starting ‘inject-index’…
[19:26:04] Finished ‘inject-index’ after 4.14 ms
[19:26:04] Starting ‘watch’…
[19:26:04] Finished ‘watch’ after 17 ms
Error in plugin 'gulp-sass’
Message:
scss/app/app.scss
16:9 file to import not found or unreadable: …/…/src/lib/ionic-content-banner/scss/ionic.content.banner
Current dir: scss/app/
Details:
column: 9
line: 16
file: scss/app/app.scss
status: 1
messageFormatted: scss/app/app.scss
16:9 file to import not found or unreadable: …/…/src/lib/ionic-content-banner/scss/ionic.content.banner
Current dir: scss/app/
[19:26:04] Finished ‘dev-sass’ after 74 ms
[19:26:04] Starting ‘default’…
[19:26:04] Finished ‘default’ after 3.63 μs
[19:26:04] gulp-inject 29 files into index-template.html.
HTML changed: src/index.html
JS changed: src/js/config/config.js


package.json

“dependencies”: {
“gulp”: “^3.5.6”,
“gulp-sass”: “^2.0.4”,
“gulp-concat”: “^2.2.0”,
“gulp-minify-css”: “^0.3.0”

node_modules/.bin/node-sass -v
node-sass 3.3.3 (Wrapper) [JavaScript]
libsass 3.2.5 (Sass Compiler) [C/C++]

ionic.content.banner?
Here is some new error log info, any sense what type of “gulp-sass” error would generate this? :

ionic $ [22:16:11] Using gulpfile ~/Code/4/gulpfile.js
[22:16:11] Starting ‘dev-config’…
[22:16:11] Finished ‘dev-config’ after 15 ms
[22:16:11] Starting ‘dev-sass’…
[22:16:11] Starting ‘inject-index’…
[22:16:11] Finished ‘inject-index’ after 3.64 ms
[22:16:11] Starting ‘watch’…
[22:16:11] Finished ‘watch’ after 18 ms
Error in plugin 'gulp-sass’
Message:
scss/app/app.scss
16:9 file to import not found or unreadable: …/…/src/lib/ionic-content-banner/scss/ionic.content.banner
Current dir: scss/app/
Details:
column: 9
line: 16
file: scss/app/app.scss
status: 1
messageFormatted: scss/app/app.scss
16:9 file to import not found or unreadable: …/…/src/lib/ionic-content-banner/scss/ionic.content.banner
Current dir: scss/app/
[22:16:11] Finished ‘dev-sass’ after 76 ms
[22:16:11] Starting ‘default’…
[22:16:11] Finished ‘default’ after 10 μs
JS changed: src/js/config/config.js
[22:16:11] gulp-inject 29 files into index-template.html.
HTML changed: src/index.html

I got the same issue when i try to upgrade and its broken

I get the same error gyp ERR! stack Error: unable to verify the first certificate while trying to download the jar node-v4.2.1-headers.tar.gz as i am behind the proxy. Please advise how to fix this problem and where exactly i need to pass the proxy details…

Thanks…

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:xxxxxx@httpproxy.xxxx.xxxxx
.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)

These links may help you, I came across these on my search to solve this issue.

https://docs.npmjs.com/getting-started/fixing-npm-permissions

I am quite new to ionic. can you please give us the steps what need to be fix the issue. it was working fine till yesterday and… i could not run ionic since this morning from the command prompt when I ran ioinc commond in windows command prompt, it has mention that ionic property not found then started installing back npm install -g ionic. assuming the ionic got corrupted. in the process of installation i got this certificate error

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:xxxxxx@httpproxy.xxxx.xxxxx
.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

I updated npm config file with proxy settings however i still get the same issue…

Hi stirumala, If I could help you more, I would. I have the same issue as you more or less and the problem is some kind of version compatibility issue. I am trying to find out what I can, and will share anything I find out.

Thank you.Will trouble shoot tomorrow from my end and let to you know for any outcome. The other option I am thinking is to download the https://nodejs.org/download/release/v4.2.1/node-v4.2.1-headers.tar to local on my machine as it blocking to download through proxy settings… But not sure when exactly to place that zip file for installation. One thing I observed is ionic is not clean behind the proxy settings. You need proxy settings at various places in npm config git, maven repo, gradles properties for a given project.the only best way to resolve them is to Google the issues that came while installation of corodava, ionic ionic build.will document everything and publish once the current issue is resolved.

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:password@httpproxy.xxxxxx:8080
https-proxy=http://user:password@httpproxy.xxxxxxxx:8080
strict-ssl=false

am using node version v4.2.1 and npm version 2.14.7

When i run: npm install -g ionic i get the above error, no problem running npm install -g cordova. I had no problems installing and updating ionic before until now.

@aslani_mobil… same here it works excellent at home. but having issues at work behind the proxy. I am using the same versions what you mentioned still could not resolve the problem.
the only solution i am seeing at this point is to figure out the entry defined for https://nodejs.org/download/release/v4.2.1/node-v4.2.1-headers.tar in script that shows on the console while installing ionic. replace https to http://nodejs.org/download/release/v4.2.1/node-v4.2.1-headers.tar

or import the certificate for https from node js.org.

Holy issues batman. So there’s a lot of info here, but could someone just summarize what the issue is?

For what it’s work this is the version of sass we use with ionic

Thanks Mike, I was definitely sending out the Bat Signal there, glad you responded.
So, my issue is with node-sass-gulp and some version issue, which I will attempt to fix by back versioning to what you have listed there, and what bonatoque has listed:

I think what @aslani_mobil and @stirumala are dealing with is a network proxy issue and probably something different from what my issue is. I will report back if back versioning solves my issue.

Ionic worked fine with the proxy when the node version was v4.2.1 and npm version 2.14.7. Ionic stopped working after I updated the nmp to v3.3.8( node is still with same v4.2.1 ). When I try to reinstall ionic i am getting the following error in proxy settings… when I try to reinstall ionic using npm install -g ionic

C:\Users\UserID>npm install -g ionic
C:\Users\UserID\AppData\Roaming\npm\ionic -> C:\Users\UserID\AppData\Roaming\npm\n
ode_modules\ionic\bin\ionic

node-sass@3.3.3 install C:\Users\UserID\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\node-sass
node scripts/install.js

Cannot download “https://github.com/sass/node-sass/releases/download/v3.3.3/win32-x64-46_binding.node”: tunneling socket could not be established, cause=read ECONNRESET

spawn-sync@1.0.13 postinstall C:\Users\UserID\AppData\Roaming\npm\node_modules
ionic\node_modules\ionic-app-lib\node_modules\cross-spawn\node_modules\spawn-syn
c
node postinstall
node-sass@3.3.3 postinstall C:\Users\UserID\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\node_modules\node-sass
node scripts/build.js
Building: C:\nodejs\node.exe C:\Users\UserID\AppData\Roaming\npm\node_modules\ion
ic\node_modules\ionic-app-lib\node_modules\node-sass\node_modules\node-gyp\bin\n
ode-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags=
–libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ ‘C:\nodejs\node.exe’,
gyp verb cli ‘C:\Users\UserID\AppData\Roaming\npm\node_modules\ionic\no
de_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 node-gyp@3.0.3
gyp info using node@4.2.1 | 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:\Python27\python.exe” in
the PATH
gyp verb which succeeded C:\Python27\python.exe 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\UserID.node-gyp\4.2.1
gyp verb created nodedir C:\Users\UserID.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://userId:pwsd@proxyhost:80/"
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\UserID.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 get local issuer certificate
gyp ERR! stack at Error (native)
gyp ERR! stack at TLSSocket. (_tls_wrap.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:\nodejs\node.exe” “C:\Users\UserID\AppData\Roaming\npm
\node_modules\ionic\node_modules\ionic-app-lib\node_modules\node-sass\nod
e_modules\node-gyp\bin\node-gyp.js” “rebuild” “–verbose” “–libsass_ext=” “-
-libsass_cflags=” “–libsass_ldflags=” "–libsass_library="
gyp ERR! cwd C:\Users\UserID\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 install:node-sass@3.3.3 node-sass@3.3.3 postinstall: node scripts/buil d.js
npm WARN install:node-sass@3.3.3 Exit status 1
C:\Users\UserID\AppData\Roaming\npm
└── (empty)

npm ERR! code 1

my proxy settings in .npmrc is

proxy = "http://UserID:pwd@proxyhost:80/"
python = "C:\Python27\python.exe"
registry = "http://registry.npmjs.org/"
strict-ssl = false

Please advise

so, I downgraded versions and followed the advice in the version lists and linksI listed above, and I also did Ionic CLI : listen EADDRINUSE (CLI v1.6.1)

ionic serve --address 127.0.0.1 --port 8101
to deal with my address in use error, and things are working for me.
Can’t say what exactly was the root issue/s but that’s what worked for me.

Well the only way I was able to install ionic was using a very old version:

npm install -g ionic@1.3.4

Lots of ppl are having problems installing ionic behind proxy, but the Ionic team is not doing anything about it.