trion-development / docker-ng-cli-e2e

Angular end2end tests inside docker
MIT License
24 stars 11 forks source link

Latest image - SASS problem - example #9

Closed DeyV closed 5 years ago

DeyV commented 5 years ago

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


2. 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 ] }


3. 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:

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. (/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)
everflux commented 5 years ago

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

DeyV commented 5 years ago

yes - procps fix first problem.

everflux commented 5 years ago

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