Error running npm run serves

Asked

Viewed 14 times

-4

People already downloaded the most dependencies when I run the npm run serves appears this here: npm ERR! A complete log of this run can be found in: npm ERR! C: Users gifer Appdata Local npm-cache_logs 2021-08-27T17_40_28_045Z-debug.log PS C: Projects and Site Testing > npm run serves npm ERR! Missing script: "serve" npm ERR! npm ERR! To see a list of scripts, run: npm ERR! npm run

npm ERR! A complete log of this run can be found in: npm ERR! C: Users gifer Appdata Local npm-cache_logs 2021-08-27T17_40_59_923Z-debug.log PS C: Projects and Sites Test Site>

  • "ERR! Missing script: "serves"", it seems there is no command serve that you tried to use.

  • So the problem is that I’m not getting into the project I downloaded the dependencies more when entering the project does not run the site

  • 1

    The error message suggests that you run npm run to see the list of available commands. What are they? What is the contents of the file package.json?

1 answer

-2

In your package.json, add section scripts to the command line with the name server. example:

"scripts": {
    "ng": "ng",
    "start": "ng serve",
    "serve": "your command",
    "build": "ng build",
    "watch": "ng build --watch --configuration development",
    "test": "ng test"
},

It seems that your package.json does not have this script

Browser other questions tagged

You are not signed in. Login or sign up in order to post.