Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error running grunt

Tags:

sass

gruntjs

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 reinstalling node-sass? Warning: Task "sass" not found. Use --force to continue.

Aborted due to warnings.

like image 340
cinammon roll Avatar asked Aug 10 '16 13:08

cinammon roll


People also ask

How do I run a grunt in Moodle?

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".

What is grunt in Devops?

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.

How do I install grunt in task runner?

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.


2 Answers

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

like image 173
Shane M. Avatar answered Nov 15 '22 08:11

Shane M.


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/

like image 22
iulo Avatar answered Nov 15 '22 08:11

iulo