{"id":15196,"date":"2024-01-22T05:42:03","date_gmt":"2024-01-22T05:42:03","guid":{"rendered":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?p=15196"},"modified":"2024-01-22T05:48:12","modified_gmt":"2024-01-22T05:48:12","slug":"encountering-a-no-such-file-or-directory-error","status":"publish","type":"post","link":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/encountering-a-no-such-file-or-directory-error\/","title":{"rendered":"Encountering a &#8220;No such file or directory&#8221; error while attempting to remove a NodeJS application via CloudLinux"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Cause:<\/h2>\n\n\n\n<p>Upon trying to uninstall the NodeJS application through cPanel &gt;&gt; Software &gt;&gt; NodeJS, the system shows the following error:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"384\" height=\"288\" src=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2024\/01\/no-such-file-or-directory-error.png\" alt=\"No such file or directory error\" class=\"wp-image-15197\" srcset=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2024\/01\/no-such-file-or-directory-error.png 384w, https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2024\/01\/no-such-file-or-directory-error-300x225.png 300w\" sizes=\"auto, (max-width: 384px) 100vw, 384px\" \/><\/figure>\n\n\n\n<p><strong>ERROR:<\/strong> [Errno 2] No such file or directory: &#8216;\/home\/cptechs\/public_html\/app\/.htaccess&#8217;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Reason for the Error Occurrence:<\/h2>\n\n\n\n<p>This error arises when the application directory is deleted through the command line rather than being correctly removed from the interface.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Solution:<\/h2>\n\n\n\n<p>1: Recreate the deleted application directory using the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># mkdir -v \/home\/cptechs\/public_html\/app<\/code><\/pre>\n\n\n\n<p>The above example assumes the application&#8217;s directory is \/home\/cptechs\/public_html\/app. Adjust the directory path according to your application&#8217;s location, and then recreate the deleted application.<\/p>\n\n\n\n<p>2: Generate an empty .htaccess file within the directory:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># touch \/home\/cptechs\/public_html\/app\/.htaccess<\/code><\/pre>\n\n\n\n<p>3: Adjust ownership of the newly created file to the appropriate cPanel user:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># chown cptechs:cptechs \/home\/cptechs\/public_html\/app\/.htaccess<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Cause: Upon trying to uninstall the NodeJS application through cPanel &gt;&gt; Software &gt;&gt; NodeJS, the system shows the following error: ERROR: [Errno 2] No such file or directory: &#8216;\/home\/cptechs\/public_html\/app\/.htaccess&#8217; Reason for the Error Occurrence: This error arises when the application directory is deleted through the command line rather than being correctly removed from the interface. [&hellip;]<\/p>\n","protected":false},"author":39,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41],"tags":[2994],"class_list":["post-15196","post","type-post","status-publish","format-standard","placeholder-for-hentry","category-howtos","tag-nodejs-error"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Encountering a &quot;No such file or directory&quot; error while attempting to remove a NodeJS application via CloudLinux<\/title>\n<meta name=\"description\" content=\"Learn how to resolve the &quot;No such file or directory&quot; error with our step-by-step guide. Troubleshoot the encountered error effortlessly.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/encountering-a-no-such-file-or-directory-error\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Encountering a &quot;No such file or directory&quot; error while attempting to remove a NodeJS application via CloudLinux\" \/>\n<meta property=\"og:description\" content=\"Learn how to resolve the &quot;No such file or directory&quot; error with our step-by-step guide. Troubleshoot the encountered error effortlessly.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/encountering-a-no-such-file-or-directory-error\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Hosting FAQs by MilesWeb\" \/>\n<meta property=\"article:published_time\" content=\"2024-01-22T05:42:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-22T05:48:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2024\/01\/no-such-file-or-directory-error.png\" \/>\n<meta name=\"author\" content=\"Olivia Jones\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Olivia Jones\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/encountering-a-no-such-file-or-directory-error\/\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/encountering-a-no-such-file-or-directory-error\/\",\"name\":\"Encountering a \\\"No such file or directory\\\" error while attempting to remove a NodeJS application via CloudLinux\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/encountering-a-no-such-file-or-directory-error\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/encountering-a-no-such-file-or-directory-error\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2024\/01\/no-such-file-or-directory-error.png\",\"datePublished\":\"2024-01-22T05:42:03+00:00\",\"dateModified\":\"2024-01-22T05:48:12+00:00\",\"author\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/3a641791b9511cfccbc9dffe66b65a86\"},\"description\":\"Learn how to resolve the \\\"No such file or directory\\\" error with our step-by-step guide. Troubleshoot the encountered error effortlessly.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/encountering-a-no-such-file-or-directory-error\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/encountering-a-no-such-file-or-directory-error\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/encountering-a-no-such-file-or-directory-error\/#primaryimage\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2024\/01\/no-such-file-or-directory-error.png\",\"contentUrl\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2024\/01\/no-such-file-or-directory-error.png\",\"width\":384,\"height\":288,\"caption\":\"No such file or directory error\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/encountering-a-no-such-file-or-directory-error\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Encountering a &#8220;No such file or directory&#8221; error while attempting to remove a NodeJS application via CloudLinux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\",\"name\":\"Web Hosting FAQs by MilesWeb\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/3a641791b9511cfccbc9dffe66b65a86\",\"name\":\"Olivia Jones\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/71bfca68e492d224472a5bf10c3642f1?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/71bfca68e492d224472a5bf10c3642f1?s=96&d=blank&r=g\",\"caption\":\"Olivia Jones\"},\"description\":\"I'm a seasoned Technical Writer with over a decade of experience in the field. I've a strong background in translating complex technical information into clear and concise documentation for a variety of audiences. Also, known for meticulous attention to detail and his ability to work efficiently under tight deadlines.\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/author\/grace-cornish\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Encountering a \"No such file or directory\" error while attempting to remove a NodeJS application via CloudLinux","description":"Learn how to resolve the \"No such file or directory\" error with our step-by-step guide. Troubleshoot the encountered error effortlessly.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/encountering-a-no-such-file-or-directory-error\/","og_locale":"en_GB","og_type":"article","og_title":"Encountering a \"No such file or directory\" error while attempting to remove a NodeJS application via CloudLinux","og_description":"Learn how to resolve the \"No such file or directory\" error with our step-by-step guide. Troubleshoot the encountered error effortlessly.","og_url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/encountering-a-no-such-file-or-directory-error\/","og_site_name":"Web Hosting FAQs by MilesWeb","article_published_time":"2024-01-22T05:42:03+00:00","article_modified_time":"2024-01-22T05:48:12+00:00","og_image":[{"url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2024\/01\/no-such-file-or-directory-error.png","type":"","width":"","height":""}],"author":"Olivia Jones","twitter_misc":{"Written by":"Olivia Jones","Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/encountering-a-no-such-file-or-directory-error\/","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/encountering-a-no-such-file-or-directory-error\/","name":"Encountering a \"No such file or directory\" error while attempting to remove a NodeJS application via CloudLinux","isPartOf":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/encountering-a-no-such-file-or-directory-error\/#primaryimage"},"image":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/encountering-a-no-such-file-or-directory-error\/#primaryimage"},"thumbnailUrl":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2024\/01\/no-such-file-or-directory-error.png","datePublished":"2024-01-22T05:42:03+00:00","dateModified":"2024-01-22T05:48:12+00:00","author":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/3a641791b9511cfccbc9dffe66b65a86"},"description":"Learn how to resolve the \"No such file or directory\" error with our step-by-step guide. Troubleshoot the encountered error effortlessly.","breadcrumb":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/encountering-a-no-such-file-or-directory-error\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.milesweb.co.uk\/hosting-faqs\/encountering-a-no-such-file-or-directory-error\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/encountering-a-no-such-file-or-directory-error\/#primaryimage","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2024\/01\/no-such-file-or-directory-error.png","contentUrl":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2024\/01\/no-such-file-or-directory-error.png","width":384,"height":288,"caption":"No such file or directory error"},{"@type":"BreadcrumbList","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/encountering-a-no-such-file-or-directory-error\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/"},{"@type":"ListItem","position":2,"name":"Encountering a &#8220;No such file or directory&#8221; error while attempting to remove a NodeJS application via CloudLinux"}]},{"@type":"WebSite","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/","name":"Web Hosting FAQs by MilesWeb","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/3a641791b9511cfccbc9dffe66b65a86","name":"Olivia Jones","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/71bfca68e492d224472a5bf10c3642f1?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/71bfca68e492d224472a5bf10c3642f1?s=96&d=blank&r=g","caption":"Olivia Jones"},"description":"I'm a seasoned Technical Writer with over a decade of experience in the field. I've a strong background in translating complex technical information into clear and concise documentation for a variety of audiences. Also, known for meticulous attention to detail and his ability to work efficiently under tight deadlines.","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/author\/grace-cornish\/"}]}},"views":0,"_links":{"self":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/15196","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/users\/39"}],"replies":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/comments?post=15196"}],"version-history":[{"count":2,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/15196\/revisions"}],"predecessor-version":[{"id":15201,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/15196\/revisions\/15201"}],"wp:attachment":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/media?parent=15196"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/categories?post=15196"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/tags?post=15196"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}