Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel elixir Sass error

I'm installing laravel elixir on my latest homestead machine , working on laravel 5.3, i followed the exact documentation to install laravel elixir, but it didn't worked , it's throwing error regarding sass file. here is snapshot

How do i solve this issue. test version is -> ```

[19:33:15] Using gulpfile ~/sites/dev.friendsforever/server/gulpfile.js
[19:33:15] Starting 'all'...
[19:33:15] Starting 'sass'...
[19:33:16] 'sass' errored after 169 ms
[19:33:16] Error: ENOENT: no such file or directory, scandir '/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/vendor'
    at Error (native)
    at Object.fs.readdirSync (fs.js:856:18)
    at Object.getInstalledBinaries (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/extensions.js:119:13)
    at foundBinariesList (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/errors.js:20:15)
    at foundBinaries (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/errors.js:15:5)
    at Object.module.exports.missingBinary (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/errors.js:45:5)
    at Object.<anonymous> (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/index.js:15:28)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
[19:33:16] 'all' errored after 179 ms
[19:33:16] Error in plugin 'run-sequence(sass)'
Message:
    ENOENT: no such file or directory, scandir '/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/vendor'
Details:
    errno: -2
    code: ENOENT
    syscall: scandir
    path: /home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/vendor
Stack:
Error: ENOENT: no such file or directory, scandir '/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/vendor'
    at Error (native)
    at Object.fs.readdirSync (fs.js:856:18)
    at Object.getInstalledBinaries (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/extensions.js:119:13)
    at foundBinariesList (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/errors.js:20:15)
    at foundBinaries (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/errors.js:15:5)
    at Object.module.exports.missingBinary (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/errors.js:45:5)
    at Object.<anonymous> (/home/vagrant/sites/dev.friendsforever/server/node_modules/node-sass/lib/index.js:15:28)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)

``` image version is ->

enter image description here

like image 977
Rahul Avatar asked Aug 26 '16 18:08

Rahul


2 Answers

the problem is the incompatibility between OS and node js, so the solution is just run the command npm rebuild node-sass.

Just run npm rebuild node-sass from within your Host computer. If you have node installed on your computer, it will rebuild node-sass, detect whatever environment your Host computer is, and do something specific to that node-sass build.

Then run gulp command, hope it will work.

like image 162
mubasher chaudhary Avatar answered Oct 09 '22 18:10

mubasher chaudhary


If you haven't figured it out by now, you can run

npm install node-sass --no-bin-links

from within the virtual machine and then gulp should work.

like image 24
Mihai Ocneanu Avatar answered Oct 09 '22 20:10

Mihai Ocneanu