Ionic setup sass - error

I get this error when trying to "ionic setup sass"
Any ideas how to fix this?

 C:\Src\Projects\myApp>ionic setup sass npmnpm WARN package.json myapp@1.0.0 No README data npm node-sass@0.9.6 install C:\Src\Projects\myApp\node_modules\gulp-sass\node_modu les\node-sass node build.js child_process: customFds option is deprecated, use stdio instead. C:\Src\Projects\myApp\node_modules\gulp-sass\node_modules\node-sass>node "C:\Src \nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node- gyp.js" rebuild child_process: customFds option is deprecated, use stdio instead. Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.ta rgets(64,5): error MSB8020: The build tools for Visual Studio 2010 (Platform Too lset = 'v100') cannot be found. To build using the v100 build tools, please inst all Visual Studio 2010 build tools. Alternatively, you may upgrade to the curre nt Visual Studio tools by selecting the Project menu or right-click the solution , and then selecting "Upgrade Solution...". [C:\Src\Projects\myApp\node_modules\ gulp-sass\node_modules\node-sass\build\binding.vcxproj] gyp ERR! build error gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe` fail ed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Src\nodejs\node_modules\npm\node_m odules\node-gyp\lib\build.js:267:23) gyp ERR! stack at ChildProcess.emit (events.js:110:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1067 :12) gyp ERR! System Windows_NT 6.3.9600 gyp ERR! command "node" "C:\\Src\\nodejs\\node_modules\\npm\\node_modules\\node- gyp\\bin\\node-gyp.js" "rebuild" gyp ERR! cwd C:\Src\Projects\myApp\node_modules\gulp-sass\node_modules\node-sass gyp ERR! node -v v0.12.0 gyp ERR! node-gyp -v v1.0.2 gyp ERR! not ok Build failed npm ERR! Windows_NT 6.3.9600 npm ERR! argv "C:\\Src\\nodejs\\\\node.exe" "C:\\Src\\nodejs\\node_modules\\npm\ \bin\\npm-cli.js" "install" npm ERR! node v0.12.0 npm ERR! npm v2.5.1 npm ERR! code ELIFECYCLE npm ERR! node-sass@0.9.6 install: `node build.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-sass@0.9.6 install script 'node 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 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:\Src\Projects\myApp\npm-debug.log 

Error running npm install

I put “npm-debug.log” to this link
and complete test project ZIP file to this link

So from the looks of the error, it looks like you have node 0.12. Can you try with node 0.10.36 instead?

1 Like

Thanks mhartington. With 0.10.36 work OK.

I was having a similar error to do with Python missing when trying to run

npm install

Uninstalling Node v0.12 and installing Node v0.10.36 from here:
http://nodejs.org/dist/v0.10.36/x64/
fixed my problem.

I just installed the latest version of node too (0.12.0)… getting the same issue with sass errors.

How do I install the 0.10.36 version in the command line on windows?

Thanks!

The link above from @GFoley83 should be give you the right version of node you need.

@mhartington @GFoley83

I have installed that correct version of nodejs and am still getting an error.

I installed the node version 0.10.36

Then ran npm install -g cordova ionic

Then ran ionic start ProjectName blank

…all works fine up to here.

Then cd into ProjectName

and ran ionic setup sass which fails and says Error running npm install

Any ideas? :frowning:

Error:

Error: Cannot find module 'abbrev' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17)

@mhartington @GFoley83

I have rolled back my version of node to 0.10.36 and further still to 0.10.26 and that makes no difference at all

I am using the latest version of Ionic which might be making a difference?

With this setup which is on my other PC it does work…

Node: 0.10.26
npm: 1.4.3
Cordova: 4.2.0
Ionic CLI: 1.3.13

On this PC the command ionic setup sass doesnt work and I currently have…

Node: 0.10.26
npm: 1.4.3
Cordova: 4.3.0
Ionic CLI: 1.3.14

I dont know what could be causing the error, hmm

Here’s the console log leading up to the error after running ionic setup sass on a brand new created project:

npm info linkStuff camelcase-keys@1.0.0 npm info build C:\Users\Matthew\Documents\IonicProjects\anotherTest\node_modules\gulp-util\node_modules\dateformat npm info linkStuff dateformat@1.0.11 npm info install camelcase-keys@1.0.0 npm info build C:\Users\Matthew\Documents\IonicProjects\anotherTest\node_modules\gulp\node_modules\liftoff\node_modules\ findup-sync\node_modules\glob\node_modules\once npm info linkStuff once@1.3.1 npm info install once@1.3.1 npm info postinstall camelcase-keys@1.0.0 npm info preinstall readable-stream@1.0.33 npm info preinstall get-stdin@4.0.1 npm info postinstall once@1.3.1 npm info preinstall duplexer2@0.0.2 npm info preinstall meow@3.1.0 npm info build C:\Users\Matthew\Documents\IonicProjects\anotherTest\node_modules\gulp-concat\node_modules\gulp-util\node _modules\dateformat\node_modules\get-stdin npm info linkStuff get-stdin@4.0.1 npm info preinstall repeating@1.1.2 npm info install get-stdin@4.0.1 npm info postinstall get-stdin@4.0.1 npm info install dateformat@1.0.11 npm info postinstall dateformat@1.0.11 npm info preinstall clean-css@3.0.10 npm info install isarray@0.0.1 into C:\Users\Matthew\Documents\IonicProjects\anotherTest\node_modules\gulp-minify-css\no de_modules\through2\node_modules\readable-stream npm info install core-util-is@1.0.1 into C:\Users\Matthew\Documents\IonicProjects\anotherTest\node_modules\gulp-minify-c ss\node_modules\through2\node_modules\readable-stream npm info install string_decoder@0.10.31 into C:\Users\Matthew\Documents\IonicProjects\anotherTest\node_modules\gulp-mini fy-css\node_modules\through2\node_modules\readable-stream npm info install inherits@2.0.1 into C:\Users\Matthew\Documents\IonicProjects\anotherTest\node_modules\gulp-minify-css\n ode_modules\through2\node_modules\readable-stream npm info installOne isarray@0.0.1 npm info installOne core-util-is@1.0.1 npm info installOne string_decoder@0.10.31 npm info installOne inherits@2.0.1 npm info preinstall ansi-regex@1.1.1 npm info C:\Users\Matthew\Documents\IonicProjects\anotherTest\node_modules\gulp-minify-css\node_modules\through2\node_mo dules\readable-stream\node_modules\isarray Error running npm install

change gulp-sass version to “^1.2.0” in package.json file and try again.
Ionic team must update this version in sources to avoid errors.

4 Likes

@bobrov1989 after doing that I just get this…

> node-sass@2.0.1 install C:\Users\Matthew\Documents\IonicProjects\test1\node_modules\gulp-sass\node_modules\node-sass > node scripts/install.js npm info postinstall node-sass@2.0.1 > node-sass@2.0.1 postinstall C:\Users\Matthew\Documents\IonicProjects\test1\node_modules\gulp-sass\node_modules\node-sa ss > node scripts/build.js `win32-x64-node-0.10` exists; testing Binary is fine; exiting npm info build C:\Users\Matthew\Documents\IonicProjects\test1\node_modules\gulp-sass npm info linkStuff gulp-sass@1.3.3 npm info install gulp-sass@1.3.3 npm info postinstall gulp-sass@1.3.3 npm info build C:\Users\Matthew\Documents\IonicProjects\test1 npm info linkStuff test1@1.0.0 npm info install test1@1.0.0 npm info postinstall test1@1.0.0 npm info prepublish test1@1.0.0 gulp-sass@1.3.3 node_modules\gulp-sass ├── clone@0.1.19 ├── map-stream@0.1.0 ├── vinyl-sourcemaps-apply@0.1.4 (source-map@0.1.43) ├── gulp-util@3.0.4 (array-differ@1.0.0, beeper@1.0.0, object-assign@2.0.0, array-uniq@1.0.2, lodash._reevaluate@3.0.0, lodash._reescape@3.0.0, lodash._reinterpolate@3.0.0, replace-ext@0.0.1, minimist@1.1.1, vinyl@0.4.6, chalk@1.0.0, lodash .template@3.3.2, dateformat@1.0.11, through2@0.6.3, multipipe@0.1.2) └── node-sass@2.0.1 (object-assign@2.0.0, get-stdin@4.0.1, replace-ext@0.0.1, cross-spawn@0.2.6, nan@1.7.0, chalk@0.5.1, semver@4.3.1, meow@3.1.0, mkdirp@0.5.0, npmconf@2.1.1, gaze@0.5.1, request@2.53.0, sass-graph@1.0.3, mocha@2.2.1) npm Successful npm install Updated C:\Users\Matthew\Documents\IonicProjects\test1\www\index.html <link href> references to sass compiled css Ionic project ready to use Sass! * Customize the app using scss/ionic.app.scss * Run ionic serve to start a local dev server and watch/compile Sass to CSS 'gulp' is not recognized as an internal or external command, operable program or batch file. Error running gulp sass

You get “Successful npm install” - result.
Congrats you have already install sass to your project)
but it seems you did’t install gulp globally.
To do it run “npm install -g gulp” - and try again

the last version of nodeJS doesn’t support node-sass 0.9.4 - in this case dev must use gulp-sass ^1.2.0 that requires node-sass 2.0.1

1 Like

I am still very confused by this because it seemed as though my work pc is working correctly, however with what ‘seems’ to be the same setup on my home pc it errors all the time.

I did see that too and ran npm install -g gulp, but then there was yet another dependency error after that.

Shouldnt ionic install gulp and all necessary dependencies automagicaly anyway? I thought to start an ionic project all you needed to do was install the latest version of Nodejs (therefore installing npm) and then run npm install -g ionic and away you go?

Right…

I’ve just uninstalled all my npm packages (ionic cordova gulp phonegap) and ran npm ls to make sure there was no more packages

Then uninstalled npm and Nodejs from my machine, and I’ve done a fresh node install of version 0.10.36 and npm 1.4.28

C:\Users\Matthew>npm ls npm info it worked if it ends with ok npm info using npm@1.4.28 npm info using node@v0.10.36 C:\Users\Matthew └── (empty) npm info ok 

So I have now have this setup:

C:\Users\Matthew\Documents\IonicProjects\testAfterFreshInstall>ionic info Your system information: OS: Windows 8 Node Version: v0.10.36 Cordova CLI: 4.3.0 Ionic Version: 1.0.0-rc.0 Ionic CLI Version: 1.3.14 

I then create a new project by using ionic start testAfterFreshInstall which created my new directory fine.

Then cd into it and ran ionic setup sass. It runs a load of requests but then ends with…

npm info installOne isarray@0.0.1 npm info installOne core-util-is@1.0.1 npm info installOne string_decoder@0.10.31 npm info installOne inherits@2.0.1 Error running npm install 

Then I ran npm install -g gulp to see if that would help for any reason (which worked fine)

Then ran ionic setup sass again and this time it doesn’t download loads of things and runs quickly but errors with…

C:\Users\Matthew\Documents\IonicProjects\testAfterFreshInstall>ionic setup sass npm info it worked if it ends with ok npm info using npm@1.4.28 npm info using node@v0.10.36 npm WARN package.json testafterfreshinstall@1.0.0 No README data npm info preinstall testafterfreshinstall@1.0.0 npm info build C:\Users\Matthew\Documents\IonicProjects\testAfterFreshInstall npm info linkStuff testafterfreshinstall@1.0.0 npm info install testafterfreshinstall@1.0.0 npm info postinstall testafterfreshinstall@1.0.0 npm info prepublish testafterfreshinstall@1.0.0 npm Successful npm install Updated C:\Users\Matthew\Documents\IonicProjects\testAfterFreshInstall\www\index.html <link href> references to sass compiled css Ionic project ready to use Sass! * Customize the app using scss/ionic.app.scss * Run ionic serve to start a local dev server and watch/compile Sass to CSS Error: Cannot find module 'isarray' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object.<anonymous> (C:\Users\Matthew\Documents\IonicProjects\testAfterFreshInstall\node_modules\gulp\node_modules\gulp-util\node_modules\multipipe\node_modules\duplexer2\node_modules\readable-s tream\lib\_stream_readable.js:25:15) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Module.require (module.js:364:17) Error running gulp sass

@mhartington @bobrov1989 Sorry for all the posting, just really trying to get this sorted!

After I got those errors I previously posted, I ran npm ls in that ionic directory and this is the output… seems like a lot is missing

C:\Users\Matthew\Documents\IonicProjects\testAfterFreshInstall>npm ls npm info it worked if it ends with ok npm info using npm@1.4.28 npm info using node@v0.10.36 testafterfreshinstall@1.0.0 C:\Users\Matthew\Documents\IonicProjects\testAfterFreshInstall npm ERR! missing: core-util-is@~1.0.0, required by readable-stream@1.1.13 npm ERR! missing: isarray@0.0.1, required by readable-stream@1.1.13 npm ERR! missing: string_decoder@~0.10.x, required by readable-stream@1.1.13 npm ERR! missing: inherits@~2.0.1, required by readable-stream@1.1.13 npm ERR! missing: chalk@~0.5.1, required by node-sass@0.9.6 npm ERR! missing: mkdirp@~0.5.0, required by node-sass@0.9.6 npm ERR! missing: mocha@~1.21.4, required by node-sass@0.9.6 npm ERR! missing: nan@~1.3.0, required by node-sass@0.9.6 npm ERR! missing: node-watch@~0.3.4, required by node-sass@0.9.6 npm ERR! missing: object-assign@~1.0.0, required by node-sass@0.9.6 npm ERR! missing: sinon@~1.10.3, required by node-sass@0.9.6 npm ERR! missing: node-sass-middleware@~0.3.0, required by node-sass@0.9.6 npm ERR! missing: yargs@~1.3.1, required by node-sass@0.9.6 npm ERR! missing: get-stdin@~3.0.0, required by node-sass@0.9.6 npm ERR! missing: core-util-is@~1.0.0, required by readable-stream@1.1.13 npm ERR! missing: isarray@0.0.1, required by readable-stream@1.1.13 npm ERR! missing: string_decoder@~0.10.x, required by readable-stream@1.1.13 npm ERR! missing: inherits@~2.0.1, required by readable-stream@1.1.13 npm ERR! missing: core-util-is@~1.0.0, required by readable-stream@1.0.33 npm ERR! missing: isarray@0.0.1, required by readable-stream@1.0.33 npm ERR! missing: string_decoder@~0.10.x, required by readable-stream@1.0.33 npm ERR! missing: inherits@~2.0.1, required by readable-stream@1.0.33 npm ERR! missing: abbrev@~1.0.4, required by bower@1.3.12 npm ERR! missing: archy@0.0.2, required by bower@1.3.12 npm ERR! missing: bower-config@~0.5.2, required by bower@1.3.12 npm ERR! missing: bower-endpoint-parser@~0.2.2, required by bower@1.3.12 npm ERR! missing: bower-json@~0.4.0, required by bower@1.3.12 npm ERR! missing: bower-logger@~0.2.2, required by bower@1.3.12 npm ERR! missing: bower-registry-client@~0.2.0, required by bower@1.3.12 npm ERR! missing: cardinal@0.4.0, required by bower@1.3.12 npm ERR! missing: chalk@0.5.0, required by bower@1.3.12 npm ERR! missing: chmodr@0.1.0, required by bower@1.3.12 npm ERR! missing: decompress-zip@0.0.8, required by bower@1.3.12 npm ERR! missing: fstream@~1.0.2, required by bower@1.3.12 npm ERR! missing: fstream-ignore@~1.0.1, required by bower@1.3.12 npm ERR! missing: glob@~4.0.2, required by bower@1.3.12 npm ERR! missing: graceful-fs@~3.0.1, required by bower@1.3.12 npm ERR! missing: handlebars@~2.0.0, required by bower@1.3.12 npm ERR! missing: inquirer@0.7.1, required by bower@1.3.12 npm ERR! missing: insight@0.4.3, required by bower@1.3.12 npm ERR! missing: is-root@~1.0.0, required by bower@1.3.12 npm ERR! missing: junk@~1.0.0, required by bower@1.3.12 npm ERR! missing: lockfile@~1.0.0, required by bower@1.3.12 npm ERR! missing: lru-cache@~2.5.0, required by bower@1.3.12 npm ERR! missing: mkdirp@0.5.0, required by bower@1.3.12 npm ERR! missing: mout@~0.9.0, required by bower@1.3.12 npm ERR! missing: nopt@~3.0.0, required by bower@1.3.12 npm ERR! missing: opn@~1.0.0, required by bower@1.3.12 npm ERR! missing: osenv@0.1.0, required by bower@1.3.12 npm ERR! missing: p-throttler@0.1.0, required by bower@1.3.12 npm ERR! missing: promptly@0.2.0, required by bower@1.3.12 npm ERR! missing: q@~1.0.1, required by bower@1.3.12 npm ERR! missing: request@~2.42.0, required by bower@1.3.12 npm ERR! missing: request-progress@0.3.0, required by bower@1.3.12 npm ERR! missing: retry@0.6.0, required by bower@1.3.12 npm ERR! missing: rimraf@~2.2.0, required by bower@1.3.12 npm ERR! missing: semver@~2.3.0, required by bower@1.3.12 npm ERR! missing: shell-quote@~1.4.1, required by bower@1.3.12 npm ERR! missing: stringify-object@~1.0.0, required by bower@1.3.12 npm ERR! missing: tar-fs@0.5.2, required by bower@1.3.12 npm ERR! missing: tmp@0.0.23, required by bower@1.3.12 npm ERR! missing: update-notifier@0.2.0, required by bower@1.3.12 npm ERR! missing: which@~1.0.5, required by bower@1.3.12 npm ERR! missing: core-util-is@~1.0.0, required by readable-stream@1.0.33 npm ERR! missing: isarray@0.0.1, required by readable-stream@1.0.33 npm ERR! missing: string_decoder@~0.10.x, required by readable-stream@1.0.33 npm ERR! missing: inherits@~2.0.1, required by readable-stream@1.0.33 npm ERR! not ok code 0

While in folder:
sudo npm update
sudo npm install
sudo ionic setup sass

This fixed it for me :smile:

1 Like

hello,

I applied the proper version of Node.

I installed anything asked but :

 Creating uglify hook: C:\Users\Ron\Dev\WAIJ\hooks\after_prepare\uglify.js npm WARN prefer global jshint@2.7.0 should be installed with -g npm ERR! peerinvalid The package ng-annotate does not satisfy its siblings' peerDependencies requi rements! npm ERR! peerinvalid Peer cordova-uglify@0.1.4 wants ng-annotate@0.12.0 npm ERR! System Windows_NT 6.2.9200 npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\ \npm\\bin\\npm-cli.js" "install" npm ERR! cwd C:\Users\Ron\Dev\App npm ERR! node -v v0.10.36 npm ERR! npm -v 1.4.28 npm ERR! code EPEERINVALID Error running npm install 

Do you have any recommendation ??

OS: Windows 8 Node Version: v0.10.36 Cordova CLI: 4.3.0 Ionic Version: 1.0.0-rc.2 Ionic CLI Version: 1.3.19

This worked for me! Thanks.

Worked for me, thanks!