jvandemo / generator-angular2-library

Yeoman generator to create an Angular library
MIT License
752 stars 122 forks source link

Compilation errors cause `gulp:watch` and `playground` tasks to fail & exit #271

Open txinfo opened 6 years ago

txinfo commented 6 years ago

If you run the gulp:watch or playground tasks and make a coding error that causes a compilation failure, it stops the watch task and requires a restart. The failure seems to happen in the rollup tasks as the index.js file doesn't exist after ngc failure:

[0] [11:36:43] Starting 'rollup:fesm'... [0] [0] events.js:160 [0] throw er; // Unhandled 'error' event

Since I would imagine this is quite a common occurrence, and it is annoying to have to keep restarting your watch/playground task mnually, it would be nice to handle compilation errors more gracefully.

kkozlowski89 commented 6 years ago

Please do some changes in package.json file You have to change playground script like that:

    "playground": "concurrently \"npm run build && npm run lite\" \"npm run playground:build\"",

I had similar issue. It resolved my problem.

izifortune commented 6 years ago

@txinfo can you please try to use this PR #274 ( or apply the changes ) in your project and see if the problem still persist?

jvandemo commented 6 years ago

@izifortune — Thank you for your follow-up, much appreciated! 🏆