Knowledge Base Hub

Browse through our helpful how-to guides to get the fastest solutions to your technical issues.

Home  >  How-Tos  >  Encountering a “No such file or directory” error while attempting to remove a NodeJS application via CloudLinux
Top Scroll

Encountering a “No such file or directory” error while attempting to remove a NodeJS application via CloudLinux

 2 min

Cause:

Upon trying to uninstall the NodeJS application through cPanel >> Software >> NodeJS, the system shows the following error:

No such file or directory error

ERROR: [Errno 2] No such file or directory: ‘/home/cptechs/public_html/app/.htaccess’

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.

Solution:

1: Recreate the deleted application directory using the following command:

# mkdir -v /home/cptechs/public_html/app

The above example assumes the application’s directory is /home/cptechs/public_html/app. Adjust the directory path according to your application’s location, and then recreate the deleted application.

2: Generate an empty .htaccess file within the directory:

# touch /home/cptechs/public_html/app/.htaccess

3: Adjust ownership of the newly created file to the appropriate cPanel user:

# chown cptechs:cptechs /home/cptechs/public_html/app/.htaccess
For our Knowledge Base visitors only
Get 10% OFF on Hosting
Special Offer!
30
MINS
59
SECS
Claim the discount before it’s too late. Use the coupon code:
STORYSAVER
Note: Copy the coupon code and apply it on checkout.