gonzofish / angular-librarian

An Angular 2+ scaffolding setup for creating libraries
https://www.npmjs.com/package/angular-librarian
MIT License
91 stars 9 forks source link

Build fails but does not leave with error #61

Closed tommueller closed 7 years ago

tommueller commented 7 years ago

I wrote this here #59 already, but I think it will be overseen:

A second issue is, that the npm run g build fails, but the CI does not break, but runs through and reports to be successful. Is there maybe a process.exit(1); missing somewhere?

gonzofish commented 7 years ago

I've added some code that may help with the false positives you're experiencing, but I cannot be sure

tommueller commented 7 years ago

Still having this issue, but I think it is more a gitlab-ci / npm problem, so I will close this.

tommueller commented 7 years ago

I was able to fix the error by changing my command from npm run g test to npm test.

gonzofish commented 7 years ago

Ahhhh, good to know! Thanks, that makes perfect sense.

Basically, any of the npm run g [npm script] calls create a child_process and run the NPM script as a child process. When it fails, I don't think the failure is reaching the main process. It's always best, in a CI environment to use the base scripts (e.g., npm test, npm run build, etc.)