Module build failed: Error: Cannot find module ‘babel-core’

Below error could show up after installing dependencies to a project from Package.json. For babel specific dependency, we might have to install separate babel/core to resolve this issue. Reference – All Hail, Babel!

What is dotenv and how to use it?

Dotenv is a zero-dependency module that loads environment variables from a .env file into process.env. Storing configuration in the environment separate from code is based on The Twelve-Factor App methodology. As early as possible in your application, require and configure dotenv. require(‘dotenv’).config() Create a .env file in the root directory of your project. Add environment-specific variables on new lines in theContinue reading “What is dotenv and how to use it?”

Guppy – development made easy

Guppy is an application manager and it helps in running tasks. This involves tasks which are run through terminal. For React application development, this tool can help in minimizing the time spent on writing commands in terminal. It can npm start your app through it’s beautiful graphical user interface. It can help build the appContinue reading “Guppy – development made easy”

Fetch API in ReactJS Projects

The most basic thing I learned after fundamantals was using APIs in ReactJS. Although not easy, it took sometime to master its concepts. There are 3 ways to Fetch data from API: Using Fetch with Lifecycle Method – componentDidMount in stateful/class component Using Fetch with useState hook in stateless/functional component Using Axios AJAX call inContinue reading “Fetch API in ReactJS Projects”

Error – Expected an assignment or function call and instead saw an expression

Expected an assignment or function call and instead saw an expression is a common error whenever I forget adding return keyword to a function. In the else if return statement, I missed the return keyword, causing this error. Problem solved.