docker-ng-cli-e2e icon indicating copy to clipboard operation
docker-ng-cli-e2e copied to clipboard

Latest image - SASS problem - example

Open DeyV opened this issue 7 years ago • 3 comments

It took a while, but in the end I have an example presenting my problem with latest (slim) image

Empty angular project with yarn project.zip

  1. Working example:
docker run -u $(id -u) --rm   -v `pwd`/project/:/app trion/ng-cli:7.2.3 yarn

docker run -u $(id -u) --rm   -v `pwd`/project/:/app trion/ng-cli-e2e:7.2.3 ng test
  1. Not working:
docker run -u $(id -u) --rm   -v `pwd`/project/:/app trion/ng-cli yarn

docker run -u $(id -u) --rm   -v `pwd`/project/:/app trion/ng-cli-e2e ng test

with error:

04 02 2019 12:08:03.280:ERROR [karma-server]: { Error: spawn ps ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
    at onErrorNT (internal/child_process.js:415:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)
  errno: 'ENOENT',
  code: 'ENOENT',
  syscall: 'spawn ps',
  path: 'ps',
  spawnargs: [ '-o', 'pid', '--no-headers', '--ppid', 13 ] }
  1. Not working too: ( trion/ng-cli:7.2.3 but ng-cli-e2e:latest )
docker run -u $(id -u) --rm   -v `pwd`/project/:/app trion/ng-cli:7.2.3 yarn   

docker run -u $(id -u) --rm   -v `pwd`/project/:/app trion/ng-cli-e2e ng test

with error:

ERROR in ./src/styles.scss (./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./node_modules/sass-loader/lib/loader.js??ref--14-3!./src/styles.scss)
Module build failed (from ./node_modules/sass-loader/lib/loader.js):
Error: Missing binding /app/node_modules/node-sass/vendor/linux-x64-64/binding.node
Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 10.x

Found bindings for the following environments:
  - Linux 64-bit with Node.js 11.x

This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass` to download the binding for your current environment.
    at module.exports (/app/node_modules/node-sass/lib/binding.js:15:13)
    at Object.<anonymous> (/app/node_modules/node-sass/lib/index.js:14:35)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.sassLoader (/app/node_modules/sass-loader/lib/loader.js:46:72)
 @ ./src/styles.scss 2:14-241
 @ multi ./src/styles.scss
04 02 2019 12:04:29.444:ERROR [karma-server]: { Error: spawn ps ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
    at onErrorNT (internal/child_process.js:415:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)
  errno: 'ENOENT',
  code: 'ENOENT',
  syscall: 'spawn ps',
  path: 'ps',
  spawnargs: [ '-o', 'pid', '--no-headers', '--ppid', 13 ] }

The last error look like in my previous ticket: https://github.com/trion-development/docker-ng-cli-e2e/issues/8 (but then both images was on latest)

DeyV avatar Feb 04 '19 12:02 DeyV

That might be a missing ps binary. I will check if installing the procps packages fixes it.

everflux avatar Feb 04 '19 12:02 everflux

yes - procps fix first problem.

DeyV avatar Feb 04 '19 13:02 DeyV

Thanks for the report and great help! Fixed in :latest and repushed 7.3.0 - don't forget to pull.

everflux avatar Feb 04 '19 19:02 everflux