{"id":2731,"date":"2023-06-14T14:52:59","date_gmt":"2023-06-14T12:52:59","guid":{"rendered":"https:\/\/nguenkam.com\/blog\/?p=2731"},"modified":"2023-06-14T14:52:59","modified_gmt":"2023-06-14T12:52:59","slug":"fixes-error-typeerror-cannot-read-properties-of-undefined-reading-ondestroy","status":"publish","type":"post","link":"https:\/\/nguenkam.com\/blog\/index.php\/2023\/06\/14\/fixes-error-typeerror-cannot-read-properties-of-undefined-reading-ondestroy\/","title":{"rendered":"[Fixes] ERROR TypeError: Cannot read properties of undefined (reading &#8216;onDestroy&#8217;)"},"content":{"rendered":"\n<p>This error can occur in an Angular project and is pretty hard to debug. Some possible solutions are pointed out here:<\/p>\n\n\n\n<p><strong>First possibly case :<\/strong> You did not add a provider to your pipes<\/p>\n\n\n\n<ul><li>If you specified a new angular pipe, you should add it to declarations, exports AND providers. (Sometimes this error occurs when we forgot about the providers.)<\/li><\/ul>\n\n\n\n<p><strong>Other possible solutions : <\/strong><\/p>\n\n\n\n<ul><li>Try to remove the\u00a0<code><span class=\"has-inline-color has-vivid-cyan-blue-color\">.angular<\/span><\/code>\u00a0directory<\/li><li>You did\u00a0a faulty import of a module<\/li><\/ul>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h5>Reference:<\/h5>\n\n\n\n<p><a href=\"https:\/\/stefvanlooveren.me\/\">https:\/\/stefvanlooveren.me\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This error can occur in an Angular project and is pretty hard to debug. Some possible solutions are pointed out here: First possibly case : You did not add a provider to your pipes If you specified a new angular pipe, you should add it to declarations, exports AND providers. (Sometimes this error occurs when [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2276,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[37,83],"tags":[695,694],"_links":{"self":[{"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/2731"}],"collection":[{"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=2731"}],"version-history":[{"count":1,"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/2731\/revisions"}],"predecessor-version":[{"id":2732,"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/2731\/revisions\/2732"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/media\/2276"}],"wp:attachment":[{"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=2731"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=2731"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nguenkam.com\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=2731"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}