Skip to main content

Posts

Showing posts from February, 2021

ERROR: Support for the experimental syntax 'jsx' isn't currently enabled

When will this error occur? You may get this error while you're running unit tests in  React (TypeScript) . Fix? - Run,  > npm i webpack > npm i --save-dev  @babel/preset-env @babel/preset-react @babel/preset-typescript  @babel/plugin-proposal-class-properties - Create a .babelrc file in root folder (next to package.json ) - Update the .babelrc file as follows: { "presets": [ "@babel/preset-env", "@babel/preset-react", "@babel/preset-typescript" ], "plugins": [ "@babel/plugin-proposal-class-properties" ] } - Run,  > jest The tests will run without errors Courtesy

CentOS commands

CentOS commands: 1) To view the list of packages installed > yum list installed 2) To view the count of packages installed > yum list installed | wc -l 3) To refresh package database and install updates if any > yum update -y  (-y is added so that you need not respond with y or yes when prompted) 4) To check if package is installed > rpm -qa | grep <package-name> e.g., rpm -qa | grep docker 5) To install docker > yum install -y https://download.docker.com/linux/centos/8/x86_64/stable/Packages/containerd.io-1.4.3-3.1.el8.x86_64.rpm > curl -fsSL https://get.docker.com/ | sh > rpm -qa | grep docker docker-ce-20.10.3-3.el8.x86_64 docker-ce-rootless-extras-20.10.3-3.el8.x86_64 docker-ce-cli-20.10.3-3.el8.x86_64 COURTESY: https://vexpose.blog/2020/04/02/installation-of-docker-fails-on-centos-8-with-error-package-containerd-io-1-2-10-3-2-el7-x86-64-is-excluded/ 6) To start, stop and view status of docker > systemctl start docker > ...