Skip to content

Gulp command doesn't work #6

@finex

Description

@finex

Hi, the gulp function doesn't work on a fresh Ubuntu 16.10 installation with drupal-docker setup.

More precisely gulp watch returns the following error:

docker: Error response from daemon: invalid header field value "oci runtime error: container_linux.go:247: starting container processe caused "exec: \"gulp\":executable file not found in $PATH"\n".

This means that gulp can not be found from node:6-slim.

Steps to reproduce:

  1. download a starter theme like Zen.
  2. Create a subtheme (example: drush zen newtheme).
  3. Install node.js modules npm install && npm install gulp-cli. This command returns an access denied error because the functions script uses WWW_USER variable which is set to 82 (www-data), but it's not correct to install the node.js modules. So I've removed the "--user" parameter in order to complete this task. (N.B: should a separate issue be opened against this problem?)
  4. execute gulp watch and get the reported error.

In order to get gulp working I've had to modify the gulp() function to this:

function gulp()
{
    docker run \
        --interactive \
        $(tty_option) \
        --rm \
        --volume="$(pwd)":/usr/src/app \
        --workdir=/usr/src/app \
        ${NODE_IMAGE} \
        \
        ./node_modules/gulp/bin/gulp.js "${@}"
}

Thanks for the attention.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions