Base solution for your next web application
Open Closed

You have to be inside an angular-cli project in order to... #5280


User avatar
0
BobIngham created

aspnet-core, angular; 5.4.1 I downloaded the latest version of my source to a laptop. I am getting "You have to be inside an angular-cli project in order to use the serve command." when inside the angular project and running any ng command from the terminal. I have updated @angular/cli globally to 6.0.8 (npm install -g @angular/cli@latest). I have installed the latest @angular/cli in the project (npm install @angular/cli@latest). I have uninstalled and re-installed several times, running yarn in between, and rebooted also. My package.json file looks as follows (for devDependencies -

"devDependencies": {
    "@angular-devkit/build-angular": "~0.6.0",
    "@angular/cli": "^6.0.8",
    "@angular/compiler-cli": "6.0.0",

ng -v gives me the following:

angular-cli: 1.0.0-beta.28.3
node: 8.11.3
os: win32 x64
@angular/animations: 6.0.0
@angular/common: 6.0.0
@angular/compiler: 6.0.0
@angular/core: 6.0.0
@angular/forms: 6.0.0
@angular/http: 6.0.0
@angular/platform-browser: 6.0.0
@angular/platform-browser-dynamic: 6.0.0
@angular/platform-server: 6.0.0
@angular/router: 6.0.0
@angular/cli: 6.0.8
@angular/compiler-cli: 6.0.0

I can run the project with npm start but I can not run ng serve or ng build. Any ideas anyone?


2 Answer(s)
  • User Avatar
    0
    aaron created
    Support Team

    Uninstall angular-cli.

  • User Avatar
    0
    BobIngham created

    Thanks, Aaron, it wasn't that simple. I finally managed it by deleting some files from users/appdata, uninstalling and re-installing node and yarn and going round in circles for a couple of hours or so. Nothing to do with Zero, but thanks for your input anyway.