To Solve An unhandled exception occurred: catch clause variable is not an Error instance Error You just need to run ng g c my-component command with --skip-import as parameter and your error will be solved. Just run this command: ng g c my-component --skip-import Or You can run this command: ng g c modules/mymodule/component/testing --skip-import And now, your error must be solved. Thanks.