While running npx cap run android if you are facing the following error: native-run failed with error ERR_SDK_NOT_FOUND: No valid Android SDK root found. More details for this error may be available online: https://github.com/ionic-team/native-run/wiki/Android-Errors The solution is to install Android Studio https://developer.android.com/studio. Installing the Android Studio will automatically install the Android SDK needed for the…More
The best programming blog.
Covering a wide array of programming topics.
How to enable dark mode in iOS simulator
Go to home screen of your simulator. Click the Settings icon. Click the Developer setting, it should be present at the last of the settings. Turn on the Dark Appearance toggle. The simulator will turn into dark mode now.More
How to add iOS platform to Ionic project
Run the following commands to add ios platform to your ionic project Install the @capacitor/core package. npm install @capacitor/core Install capacitor cli: npm install @capacitor/cli –save-dev Install the capacitor/ios package npm install @capacitor/ios Add the ios platform: npx cap add ios A new folder with name ios will be added to your Ionic project:More
xcode-select: error: tool ‘xcodebuild’ requires Xcode, but active developer directory
Error: [fatal] xcode-select: error: tool ‘xcodebuild’ requires Xcode, but active developer directory ‘/Library/Developer/CommandLineTools’ is a command line tools instance The solution for the above error is to run the following command: sudo xcode-select -s /Applications/Xcode.app/Contents/Developer The above code will set the the command line tools path of XCode. Run the following command to confirm that…More
How to find Homebrew packages location
The following command will help you finding the location where HomeBrew packages are installed: brew –prefix wget Output: /opt/homebrew/opt/wget Navigating to that location will show the packages installed by HomebrewMore
How to run Ionic project in Visual Studio Code
Make sure you have installed Ionic framework. Add a file with name .nvmrc at the root of the project. In .nvmrc file add the version of node you want to us in your project. The contents of that file should like this v16.14.2 Open the Terminal in Visual Studio Code at the root of the…More
How to install Ionic on Mac
Install Node (LTS one). Install NVM. Configure your machine to run npm install without sudo. Install Ionic cli npm install -g @ionic/cli native-run cordova-res Run ionic -v command to confirm Ionic is installed on our machine ionic -v Output will show you the version of Ionic installed on your machine. Example output 6.19.0More
Run npm install without sudo
You can run the following commands to configure your machine to run the npm install without sudo: sudo chown -R $(whoami) /usr/local/{lib/node_modules,bin,share} sudo chown -R $(whoami) ~/.npm The above command will change the owner of node_modules directories to the current user. You will be able to run the npm install command without sudo now.More
npm install EACCES: permission denied mkdir
Error while running the npm install command: npm ERR! code EACCES npm ERR! syscall mkdir npm ERR! path /usr/local/lib/node_modules…. ….. Solution is to change the owner of npm directories to the current user, current user is represented by $(whomi) sudo chown -R $(whoami) /usr/local/{lib/node_modules,bin,share} sudo chown -R $(whoami) ~/.npm You will be able to run…More
How to install nvm (Node Version Manager) in MAC
Download nvm. curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash Get ready your terminal to conside nvm command. Open zshrc file by running the following command: nano ~/.zshrc Paste the following code there: export NVM_DIR=”$HOME/.nvm” [ -s “$NVM_DIR/nvm.sh” ] && \. “$NVM_DIR/nvm.sh” # This loads nvm [ -s “$NVM_DIR/bash_completion” ] && \. “$NVM_DIR/bash_completion” # This loads nvm bash_completion…More