moonlight moonlight - 1 year ago 209
PHP Question

Can't install gulp id docker container with docker-compose : Task 'install' is not in your gulpfile

I'm trying to get dockervel(docker for LAravel environment) image and I'm following the steps here:

When I come to step dnodejs gulp install I get this:

dnodejs gulp install
[22:36:37] Using gulpfile /var/www/gulpfile.js
[22:36:37] Task 'install' is not in your gulpfile
[22:36:37] Please check the documentation for proper gulpfile formatting

And the are :

alias dbuild='docker-compose build'
alias dup='docker-compose up -d'
alias dstop='docker-compose stop'
alias drun='docker-compose run -d --service-ports nginx'
alias dcomposer='docker-compose run composer'
alias dcomposer-create='docker-compose run composer create-project laravel/laravel /var/www --prefer-dist'
alias dpermit='chmod -R 777 www'
alias dartisan='docker-compose run artisan'
alias dnodejs='docker-compose run nodejs'
alias dgulp='docker-compose run nodejs gulp'
alias dgulp-watch='docker-compose run -d nodejs gulp watch'
alias dps='docker ps'
alias dpsa='docker ps -a'
alias dstats='docker stats $(docker ps -q)'
alias dkill='docker stop $(docker ps -q)'
alias drm='docker rm $(docker ps -a -q)'

Someone sees the problem?

When I run

$ docker-compose run nodejs gulp

[23:08:04] Using gulpfile /var/www/gulpfile.js
[23:08:04] Starting 'default'...
[23:08:04] Starting 'sass'...

Fetching Sass Source Files...
- resources/assets/sass/app.scss

Saving To...
- public/css/app.css

[23:08:05] Finished 'default' after 1.39 s
[23:08:05] gulp-notify: [Laravel Elixir] Sass Compiled!
[23:08:05] gulp-notify: [Error in notifier] Error in plugin 'gulp-notify'
not found: notify-send
code: ENOENT
[23:08:05] Finished 'sass' after 1.59 s

Answer Source

I believe you are getting your commands confused.

As you'll note, there is no dnodejs gulp install command in the aliases.

What I think you are intending to run above is actually two separate commands:

dnodejs to execute docker-compose run nodejs and dgulp to execute docker-compose run nodejs gulp.

It's worth noting though, that dgulp is an extension of dnodejs that runs gulp as well and so you wouldn't need to run both.

Edit regarding gulp-notify

This isn't a biggy as it will always fail, there's no notification system in the command line by default and it has no way of sending the notifications remotely to your computer i.e. outside of the docker environment.

It's essentially letting you know that it tried to send a notification, but failed. On the host machine it works as it sends the notification via the native notifications system.

Everything else looks to be working fine though!

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download