0

I got a new notebook, so I install all languages I use. I use nodejs v10.16. I had an Angular code which I wanted to run on the new notebook. The version of the node was the same. However, when I wrote in the command line npm start, I got these message:

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! <my-project>-client@0.0.0 start: `ng serve`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the <my-project>-client@0.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Why did it happend? I install node_modules before starting and it ran on my earlier notebook.

How should I solve this problem?

R. Richards
  • 21,615
  • 9
  • 55
  • 58

1 Answers1

0
  1. Make sure you're running the start script from the same location as your package.json file.

  2. Check the format of package.json scripts object, ensuring the script name is correct and denoting where the script/object ends with a comma.

    "scripts": {
      "start": "react-scripts start"
    },
    
  3. Ensure the app/module your start script is calling is installed/installed correctly.

  4. Use the full npm command to run your start script:

    npm run start

If all else fails, rename your node_modules to node_modules_old, check your package.json file has all your required dependencies and run npm install from the same directory to generate a new node_modules folder before trying to run the script again with npm run start.

RobC
  • 16,905
  • 14
  • 51
  • 62
pmilo
  • 11
  • 5