I am glad to hear this worked for you.
Just a side note:
commands like npm start can work directly because they are default commands from npm but custom commands like dev set by the user would only work with the run command. npm run dev. I hope this clears things up.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi Haim,
If you run yarn start/npm start now it points to 'serve -s build' instead of 'react-scripts start'.
Make sure you've added below:
"dev": "react-scripts start",
"start": "serve -s build",
and to run your app locally do npm run dev not npm start
Thanks. It didn't work with "npm dev" (I got that "dev" is invalid command), but it did work with "npm run dev".
I am glad to hear this worked for you.
Just a side note:
commands like
npm start
can work directly because they are default commands from npm but custom commands likedev
set by the user would only work with therun
command.npm run dev
. I hope this clears things up.