NPM Start Error

Photo by Ann H from Pexels

This will be a short but highly significant blog post that will help many React newcomers and even some veterans as well.

I’ve lost count of the number of times I’ve initially generated a new React app project by running the command-line tool create-react-app and the name of my app, then watching the myriad of processes flash in my terminal. Then eagerly running npm start, only to be met with the line of errors below:

If you start googling the errors, you get a lot of different answers that will have you making all kinds of unnecessary coding acrobatics if you haven’t made a basic check first, that could quickly remedy this problem.

Notice what folder I’m currently in:

This seasons folder is the folder that contains my React project. I actually need to be inside of my React project folder when I run npm start. So, I simply cd into my React project folder which is named frontend_season:

Now that I’m in my React project folder, frontend_season, I can run npm start:

My back end (named backend_season) is already running on port 3000, so I get a message asking if I want to run my front end on an alternate port.

I enter Y for yes and voilà:

My React project is up and running!

So remember, when your npm start is met with a line of errors, FIRST check to make sure you’re running it from inside of your React project folder. Then you won’t be making a bunch of unnecessary changes to your app that will only make things worse.

You’re welcome!

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

To Use Or Not To Use…Action Creators.

How Metamask Detects The Gas Price

A Walk Through PiTrol — Part 1

Experimenting with WebGL and Vue: How to animate subtitles?

URL OAuth For Facebook And Google || React Native|| Easy Method || Step By Step Guide

Experiment Running Tensorflow.js Code in Google Colab

Blazor component dynamics: static list (components as items)

How Competitive Programming Helped Me Land Better Jobs

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Wendy Raven McNair

Wendy Raven McNair

More from Medium

An introduction to Web Components

How to implement simple onScroll animations in your React applications with intersectionObserver.

QuantumAlert - A Javascript Alert Library 💙

https://quantumalert.cosmogic.com/

How to Extract Metadata from Music Files with JavaScript using jsmediatags