When attempting to utilize the HttpClient module in an Angular component or service but it has not been correctly imported and configured in the application’s module, the error message “No provider for HttpClient!” usually appears. You must import the HttpClientModule from the @angular/common/http package and add it to the imports array in your application’s module…More
The best programming blog.
Covering a wide array of programming topics.
Angular: No provider for UntypedFormBuilder!
If you are getting the following error while running ng test: the solution is to import ReactiveFormsModule in your spec file of your component The full file will look like this:More
Install Nginx in MAC
Nginx is a popular open-source web server that offers high performance and scalability. In this tutorial, we will walk you through the process of installing Nginx on macOS using Homebrew and accessing the default Nginx page in your web browser. Step 1: Installing Nginx with Homebrew Homebrew is a package manager for macOS that allows…More
No such file or directory – /opt/homebrew/var/homebrew/linked/nginx
Run the following three commands to remove the linked and related files with nginx You will be able to install the nginx afterwards.More
Uninstall Nginx from MAC
Run the following commands to remove Nginx from MAC :More
Detect whether MySQL is using InnoDB engine
Run the following query to detect whether yoru mysql db is a InnoDB or not. Output:More
How to rename a file in Ubuntu
Renaming a file in Ubuntu is a simple task that can be done in a few different ways. Here are three of the easiest methods: Method 1: Using the GUI The easiest way to rename a file in Ubuntu is to use the GUI. To do this, follow these steps: Method 2: Using the Terminal…More
Ubuntu: The following signatures couldn’t be verified because the public key is not available
While running sudo apt-get update command if you are getting the error like this: The solution is to get the key for the key present after NO_PUBKEY text in the error. In the above case, they key is A6A19B38D3D831EF. After running the above command the sudo apt-get update will run without any errors.More
Angular SSR Prerender: Rules skipped due to selector errors: legend+* -> Cannot read property ‘type’ of undefined
The solution is to add the following section in angular.json: The section needs to be added in architect > build > configurations > production section. The section will look like this:More
Redirect www to non www domain in Nginx Ubuntu
To redirect users from the “www” to the “non-www” version of a domain, create a new server block in the Nginx configuration file. For example, if you want your site to redirect from www.yourdomain.com to yourdomain.com for both HTTP and HTTPS schemes then you need to follow the below-mentioned steps: Open the config file of…More