Home > front end >  Angular project don't run with ng serve?
Angular project don't run with ng serve?

Time:11-28

I have a angular template but it don't run with "ng serve" command. My angular-cli.json code here:

enter image description here

CodePudding user response:

1st thing need you check your angular version using below command if not installed then install angular cli using

npm install -g @angular/cli --  for install angular.

ng --version - check installed angular version.

You can check your package.json files. below code are same or not

 "scripts": {
    "ng": "ng",
    "config": "ts-node set-env.ts",
    "start": "npm run config -- --environment=local && ng serve",
    "build:dev": "npm run config -- --environment=dev && ng build --configuration=dev",
    "build:prod": "npm run config -- --environment=prod && ng build --configuration production --verbose=true",
    "test": "ng test",
    "lint": "eslint",
    "e2e": "ng e2e"
  },
  • Related