5

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

Rahul
  • 929
  • 2
  • 8
  • 17

3 Answers3

9

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.

sepehr
  • 17,110
  • 7
  • 81
  • 119
3

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.

Mihai Ocneanu
  • 693
  • 6
  • 17
0

If you are getting "Error: ENOENT: no such file or directory..." error run this command. It worked for me.

npm rebuild node-sass

Reference: https://laracasts.com/discuss/channels/elixir/laravel-53-gulp-error-cannot-find-module-laravel-elixir-vue-2

Abhishek Sinha
  • 5,095
  • 1
  • 15
  • 14