Reputation: 1283
I am using the default ionic seed application, I have ran the setup
command ionic setup sass.
I run ionic serve
, this should be watching for sass changes but it's not.
I tried to run gulp watch
but I am getting an error.Error: Cannot find module 'semver'
Upvotes: 2
Views: 3624
Reputation: 216
Try this. It will setup the sass in your ionic project.
ionic setup sass
If gulp is not setup then run this command first
npm install gulp -g
Upvotes: 0
Reputation: 35
Using Sass in ionic project if you are using windows node cli. goto in your project by
c:\projectname
after
c:\projectname>ionic setup sass
done
http://ionicframework.com/docs/cli/sass.html
Upvotes: 0
Reputation: 2295
You can use sass via Ruby:
npm install -g node-sass
npm rebuild node-sass
So whenever you touch sass file(s), you can just rebuild the sass: npm rebuild node-sass
if not, it's OK, just continue normal ionic serve
Remark: ionic2 requires sass
Upvotes: 0
Reputation: 21
First you need to run this command ionic setup sass
when you run this command create a scss folder
in www folder
in scss folder here is style.scss
file.
and @import
this file in scss/ionic.app.scss
path.
@import "www/scss/style.scss"
in scss/ionic.app.scss
path.
Try this I hope this is work for you.
Upvotes: 2
Reputation: 76
Try using sudo ionic setup sass
You might not have had sufficient security privileges, thus not allowing sass to be setup properly. Using sudo will allow the user to act as a superuser and let sass setup correctly.
This worked for me.
Upvotes: 6
Reputation: 831
If removing the node_modules and running npm install doesn't work you can try installing gulp then install sass
npm install -g gulp
ionic setup sass
Upvotes: 0
Reputation: 165
Make sure you have changed your index.html to include the relevant css files, as the one previously will no longer be used if you want to use the .min.css one generated by sass.
Upvotes: 0
Reputation:
Please delete the 'node_modules' folder in the project directory and re-run 'npm install'. This worked for me .
Upvotes: 0