When I run the command sass -v
it appears installed Sass 3.4.22 (Selective Steve)
Then when I already have grunt installed and run grunt in a project that has grunt I get this
Loading "sass.js" tasks...ERROR
Error:
libsass
bindings not found. Try reinstallingnode-sass
? Warning: Task "sass" not found. Use--force
to continue.Aborted due to warnings.
Create a Gruntfile. js in the root of your plugin and configure the task for building CSS files from LESS: "use strict"; module. exports = function (grunt) { // We need to include the core Moodle grunt file too, otherwise we can't run tasks like "amd".
Grunt is a JavaScript task runner that automates repetitive tasks like minification, compilation, unit testing, and linting. It also has a large ecosystem of plugins that extend base functionality.
Like installing a specific version of grunt, run npm install grunt@VERSION --save-dev where VERSION is the version you need, and npm will install that version of Grunt in your project folder, adding it to your package.
You may need: https://github.com/sass/node-sass
npm install node-sass
Sass
and node-sass
are different.
To check your node-sass
version, open your terminal and type npm node-sass -v
in grunt you need grunt-sass
or grunt-contrib-sass
.
grunt-contrib-sass
need ruby
.
grunt-sass
need node-sass
.
seems link you use grunt-sass
node-sass need rebuild by c++ compiler in local computer.
In fact, it will create a binary in node_modules/node-sass/vendor
.
all binaries is here https://github.com/sass/node-sass-binaries/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With