1

Im new to using react and have recently taken over a project from a colleague. However, when trying to deploy my changes to the website, I am encountering this error.

C:\Users\Danielle\Documents\GitHub\aussieElectro> npm run deploy
scrollyteller-react@0.1.0 predeploy C:\Users\Danielle\Documents\GitHub\aussieElectro
> npm run build
scrollyteller-react@0.1.0 build C:\Users\Danielle\Documents\GitHub\aussieElectro
react-scripts build
'react-scripts' is not recognised as an internal or external comm, and operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! scrollyteller-react@0.1.0 build: 'react-scripts build'
npm ERR! Exist status 1
npm ERR!
@0.1.0 predeploy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

Could someone explain to me how to can fix this (in beginner terms...)?

Danimjs
  • 13
  • 3
  • 2
    Try running `npm i` first to install the required packages. – AKX Feb 13 '21 at 07:07
  • What AKX said is likely the solution. If it doesn't work, see this existing post: https://stackoverflow.com/questions/40546231/sh-react-scripts-command-not-found-after-running-npm-start – Ethan McTague Feb 24 '21 at 03:27

1 Answers1

0

It means that the 'react-scripts' package is not installed.

To resolve the issue :

  1. Go to the directory that has package.json for the project
  2. Ensure that package.json has react-scripts under dependencies
  3. Run npm install
Tyler Durden
  • 860
  • 6
  • 17