Finally, a working npm install routine for laravel-elixir

I work a lot with laravel in my freetime. There I take sass and typescript to build up my css and javascript files. Laravel has a great dev environment on Homestead (https://laravel.com/docs/5.2/homestead) and a simple gulp wrapper named laravel-elixir(https://laravel.com/docs/5.2/elixir). They lighten your workload a lot for dev tasks, so this tools are unalterable!

But its a big problem, if you are on windows (It’s not made for web developing isn’t it?). laravel-elixir or gulp are based on node.js (https://nodejs.org/en) and node.js doesn’t like windows at all. Cause of the big dependency trees node.js would like to make symlinks but they doesn’t exists on a windows system. So even the virtual homestead machine can not create them.

consequential you have to  npm install with the special --no-bin-links  option. In my case there often the following error occured:

So I tried a lot and despaired. But then I found a solution always works for me from now. Just install it two times and rebuild node-sass after all and it works… finally…

Sources: http://stackoverflow.com/a/30067395/4444567 and https://github.com/npm/npm/issues/10776#issuecomment-209638410

One thought on “Finally, a working npm install routine for laravel-elixir”

Leave a Reply

Your email address will not be published. Required fields are marked *