Failing to docker-compose up due to node sass

61 Views Asked by At

I need to start project with docker, but when I start docker-compose up I get this errors. I pulled from master org github, and basically when I push my branch to github it creates subdomain for my project based on branch name. The thing that is giving me a problem, it doesn't create min.js nor anything, while for my senior colleagues it does.

$ docker-compose up
[+] Building 0.0s (0/0)
[+] Running 2/2
 ✔ Container web-relaunch-2017_msd-frontend-build-1  Recreated                                                                                                                                                                                                                                                                                                                                                                    0.3s 
 ✔ Container web-relaunch-2017_msd-frontend-web-1    Recreated                                                                                                                                                                                                                                                                                                                                                                    0.2s 
Attaching to web-relaunch-2017_msd-frontend-build-1, web-relaunch-2017_msd-frontend-web-1
web-relaunch-2017_msd-frontend-build-1  | npm WARN [email protected] requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
web-relaunch-2017_msd-frontend-build-1  | npm WARN [email protected] requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.
web-relaunch-2017_msd-frontend-build-1  | npm WARN The package autoprefixer is included as both a dev and production dependency.
web-relaunch-2017_msd-frontend-build-1  | npm WARN The package grunt-contrib-clean is included as both a dev and production dependency.
web-relaunch-2017_msd-frontend-build-1  | npm WARN The package grunt-contrib-compress is included as both a dev and production dependency.
web-relaunch-2017_msd-frontend-build-1  | npm WARN The package grunt-contrib-concat is included as both a dev and production dependency.
web-relaunch-2017_msd-frontend-build-1  | npm WARN The package grunt-contrib-copy is included as both a dev and production dependency.
web-relaunch-2017_msd-frontend-build-1  | npm WARN The package grunt-contrib-cssmin is included as both a dev and production dependency.
web-relaunch-2017_msd-frontend-build-1  | npm WARN The package grunt-contrib-uglify is included as both a dev and production dependency.
web-relaunch-2017_msd-frontend-build-1  | npm WARN The package grunt-css-url-rewrite is included as both a dev and production dependency.
web-relaunch-2017_msd-frontend-build-1  | npm WARN The package grunt-sass is included as both a dev and production dependency.
web-relaunch-2017_msd-frontend-build-1  | npm WARN The package grunt-targethtml is included as both a dev and production dependency.
web-relaunch-2017_msd-frontend-build-1  | npm WARN The package grunt-text-replace is included as both a dev and production dependency.
web-relaunch-2017_msd-frontend-build-1  | npm WARN The package jit-grunt is included as both a dev and production dependency.
web-relaunch-2017_msd-frontend-build-1  | npm WARN The package uglify-save-license is included as both a dev and production dependency.
web-relaunch-2017_msd-frontend-build-1  | npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
web-relaunch-2017_msd-frontend-build-1  | npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
web-relaunch-2017_msd-frontend-build-1  | npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/chokidar/node_modules/fsevents):
web-relaunch-2017_msd-frontend-build-1  | npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
web-relaunch-2017_msd-frontend-build-1  | 
web-relaunch-2017_msd-frontend-build-1  | removed 2 packages and audited 1056 packages in 8.042s
web-relaunch-2017_msd-frontend-build-1  | found 125 vulnerabilities (2 low, 43 moderate, 65 high, 15 critical)
web-relaunch-2017_msd-frontend-build-1  |   run `npm audit fix` to fix them, or `npm audit` for details
web-relaunch-2017_msd-frontend-build-1  | /usr/local/bin/grunt -> /usr/local/lib/node_modules/grunt-cli/bin/grunt
web-relaunch-2017_msd-frontend-build-1  | + [email protected]
web-relaunch-2017_msd-frontend-build-1  | updated 1 package in 2.474s
web-relaunch-2017_msd-frontend-build-1  | 
web-relaunch-2017_msd-frontend-build-1  | jit-grunt: Plugin for the "sass" task not found.
web-relaunch-2017_msd-frontend-build-1  | If you have installed the plugin already, please setting the static mapping.
web-relaunch-2017_msd-frontend-build-1  | See https://github.com/shootaroo/jit-grunt#static-mappings
web-relaunch-2017_msd-frontend-build-1  | 
web-relaunch-2017_msd-frontend-build-1  | Warning: Task "sass:development" failed. Use --force to continue.
web-relaunch-2017_msd-frontend-build-1  | 
web-relaunch-2017_msd-frontend-build-1  | Aborted due to warnings.

version: '3.3'
services:
  build:
    build:
      context: docker/build
    volumes:
      - .:/app
    command: >
          sh -c "npm install &&
                 npm install -g grunt-cli &&
                 npm install grunt-sass &&
                 grunt dev"
  web:
    build:
      context: docker/web
    volumes:
      - type: bind
        source: ./docker/web/httpd.conf
        target: /etc/apache2/httpd.conf
      - type: bind
        source: ./
        target: /var/www/localhost/htdocs
        consistency: cached
        read_only: true
    ports:
        - 8082:80
    command: httpd -D FOREGROUND
    tty: true

this is dockerfile for build

FROM node:10.11-alpine

#
# Install common tools
#
RUN apk add --no-cache \
    bash \
    alpine-sdk \
    wget \
    patch \
    rsync \
    php \
    ruby \
    ruby-dev \
    ruby-rdoc \
    python

# Allow npm to run as root
RUN npm set unsafe-perm true

# global installed grunt cli
RUN npm install -g grunt-cli


WORKDIR /app
CMD ["/bin/bash"]

this for web:

FROM alpine:3.9

RUN apk update
RUN apk add bash

RUN apk add php7-apache2 php7-session php7-json php7-ctype php7-mbstring

WORKDIR /var/www/localhost/htdocs

What should I do? I tried rebuilding node sass, downgrading node and et, but nothing help. Is there some simple solution?

0

There are 0 best solutions below