Node-sass error (try reinstalling)

I am trying to create an external server, and when I start grunt, I get this error with a suggestion to reinstall node-sass.

Aborted due to warnings.
dev@ubuntu:~/ideaProjects/web-app$ grunt app:dashboard/dev-dashboard --force
Loading "sass.js" tasks...ERROR
Error: `/home/dev/ideaProjects/web-app/node_modules/grunt-sass/node_modules/node-sass/bin/linux-x64-v8-3.28/binding.node` is missing. 
Try reinstalling `node-sass`?

It is strange that the file (binding.node) exists, but it is located in a folder with the name 'linux-x64-v8-3.14', and not 3.28. I tried to name the folder 3.14, which did not work. I tried everything I could to get this fix, npm install node-sass, npm update, even cleaning up the project and running npm install on a new build. But to no avail. I repeatedly get this error.

Has anyone seen this or knows how to fix it? I am running Ubuntu 14.04 x64

Thank!

+4
source share
2 answers

​​Debian Linux gulp -sass ( , grunt-sass, gulp... node -sass, SASS- libsass).

node -sass README.md, " " (-, Windows/Mac), .

, node -sass Debian. :

  • linux, cd
  • cd node -sass . , - cd node_modules/grunt-sass/node_modules/node-sass .
  • node scripts/install.js
  • node scripts/build.js
  • Binary is fine; exiting.. node -sass , .
  • grunt , , !
+6

npm install . - , ? ( -. java/android > )

. : :

.
β”œβ”€β”€ Gruntfile.js
β”œβ”€β”€ node_modules
└── sass
    └── main.scss

Gruntfile.js :

module.exports = function (grunt) {

grunt.loadNpmTasks('grunt-sass');

grunt.initConfig({
    sass: {
        options: {
            sourceMap: true
        },
        dist: {
            files: {
                'css/main.css': 'sass/main.scss'
            }
        }
    }
});

grunt.registerTask('default', ['sass']);
}

:

npm install grunt-sass

:

grunt

:

Running "sass:dist" (sass) task

Done, without errors.

, npm install grunt-sass - , , :

/
> node-sass@3.1.2 install /home/testdrive/sassgrunt/node_modules/grunt-sass/node_modules/node-sass
> node scripts/install.js

Binary downloaded and installed at /home/testdrive/sassgrunt/node_modules/grunt-sass/node_modules/node-sass/vendor/linux-x64-14/binding.node

> node-sass@3.1.2 postinstall /home/testdrive/sassgrunt/node_modules/grunt-sass/node_modules/node-sass
> node scripts/build.js

` /home/testdrive/sassgrunt/node_modules/grunt-sass/node_modules/node-sass/vendor/linux-x64-14/binding.node ` exists. 
 testing binary.
Binary is fine; exiting.
+4
source

Source: https://habr.com/ru/post/1589298/


All Articles