title: Angular CLI Error: Project Definition Not Found
body: <p>I am trying to run an Angular program created by a colleague. I am getting the same error, "The serve command requires to be run in an Angular project, but a project definition could not be found." <strong>This was after running the "npm install" and "npm start" commands despite following every suggestion I could find.</strong></p>
  
  <p>My Software info:
  Angular CLI: 7.3.9
  Node: 10.15.3
  OS: darwin x64
  Angular: 7.2.15
  @angular/cli 7.3.9
  typescript 3.2.4</p>
  
  <p><strong>Note: In the package.json file it reads as directly below to indicate "ng start" script is run with the ng serve command (to my understanding).</strong></p>
  
  <pre><code> {
    "name": "twitter-api",
    "version": "0.0.0",
    "scripts": {
      "ng": "ng",
      "start": "ng serve",
      "build": "ng build",
      "test": "ng test",
      "lint": "ng lint",
      "e2e": "ng e2e"
    },
    "private": true,
    "dependencies": {
      "@angular/animations": "~7.2.0",
      "@angular/common": "~7.2.0",
      "@angular/compiler": "~7.2.0",
      "@angular/core": "~7.2.0",
      "@angular/forms": "~7.2.0",
      "@angular/platform-browser": "~7.2.0",
      "@angular/platform-browser-dynamic": "~7.2.0",
      "@angular/router": "~7.2.0",
      "body-parser": "^1.18.3",
      "core-js": "^2.5.4",
      "express": "^4.16.4",
      "rxjs": "~6.3.3",
      "tar": "^4.4.8",
      "tslib": "^1.9.0",
      "twit": "^2.2.11",
      "underscore": "^1.9.1",
      "zone.js": "~0.8.26"
    },
    "devDependencies": {
      "@angular-devkit/build-angular": "~0.13.0",
      "@angular/cli": "~7.3.7",
      "@angular/compiler-cli": "~7.2.0",
      "@angular/language-service": "~7.2.0",
      "@types/node": "~8.9.4",
      "@types/jasmine": "~2.8.8",
      "@types/jasminewd2": "~2.0.3",
      "codelyzer": "~4.5.0",
      "jasmine-core": "~2.99.1",
      "jasmine-spec-reporter": "~4.2.1",
      "karma": "~4.0.0",
      "karma-chrome-launcher": "~2.2.0",
      "karma-coverage-istanbul-reporter": "~2.0.1",
      "karma-jasmine": "~1.1.2",
      "karma-jasmine-html-reporter": "^0.2.2",
      "protractor": "~5.4.0",
      "ts-node": "~7.0.0",
      "tslint": "~5.11.0",
      "typescript": "~3.2.2"
    },
    "description": "This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.3.7.",
    "main": "index.js",
    "author": "Remington Lee",
    "license": "ISC"
  }
  </code></pre>
  
  <p><strong>Note: This error below only presents when I run the "ng start" command. If I use the "ng serve" command, the error is simply, "The serve command requires to be run in an Angular project, but a project definition could not be found."</strong></p>
  
  <pre><code>Leonas-MacBook-Air:TwitterAPI-master leonaadriennestephanieponce$ npm start
  
  &gt; twitter-search-api-erl@1.0.0 start /Users/leonaadriennestephanieponce/Downloads/TwitterAPI-master
  &gt; node ./node-server/index.js
  
  /Users/leonaadriennestephanieponce/Downloads/TwitterAPI-master/node_modules/twit/lib/twitter.js:511
        throw new Error(err_msg)
        ^
  
  Error: Twit config must include `consumer_key` when using user auth.
      at /Users/leonaadriennestephanieponce/Downloads/TwitterAPI-master/node_modules/twit/lib/twitter.js:511:13
      at Array.forEach (&lt;anonymous&gt;)
      at Twitter._validateConfigOrThrow (/Users/leonaadriennestephanieponce/Downloads/TwitterAPI-master/node_modules/twit/lib/twitter.js:508:17)
      at new Twitter (/Users/leonaadriennestephanieponce/Downloads/TwitterAPI-master/node_modules/twit/lib/twitter.js:58:8)
      at Object.&lt;anonymous&gt; (/Users/leonaadriennestephanieponce/Downloads/TwitterAPI-master/node-server/twitterService.js:7:11)
      at Module._compile (internal/modules/cjs/loader.js:701:30)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
      at Module.load (internal/modules/cjs/loader.js:600:32)
      at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
      at Function.Module._load (internal/modules/cjs/loader.js:531:3)
      at Module.require (internal/modules/cjs/loader.js:637:17)
      at require (internal/modules/cjs/helpers.js:22:18)
      at Object.&lt;anonymous&gt; (/Users/leonaadriennestephanieponce/Downloads/TwitterAPI-master/node-server/index.js:3:24)
      at Module._compile (internal/modules/cjs/loader.js:701:30)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
      at Module.load (internal/modules/cjs/loader.js:600:32)
  npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  npm ERR! twitter-search-api-erl@1.0.0 start: `node ./node-server/index.js`
  npm ERR! Exit status 1
  npm ERR! 
  npm ERR! Failed at the twitter-search-api-erl@1.0.0 start script.
  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     /Users/leonaadriennestephanieponce/.npm/_logs/2019-05-18T13_37_33_583Z-debug.log
  Leonas-MacBook-Air:TwitterAPI-master leonaadriennestephanieponce$ 
  
  </code></pre>
  
  <p><strong>I have tried these suggestions:</strong><br>
      -Verify root folder<br>
      -Verify presence of both angular.json and angular-cli.json files<br>
      -Verify compatibility of TS version<br>
      -Updating current angular cli<br></p>
  
  <blockquote>
    <p>ng update @angular/cli --migrate-only --from=
       (also via ng update --all --force)<br></p>
  </blockquote>
  
  <p>-Uninstall/reinstall/verify cache<br></p>
  
  <blockquote>
    <p>npm uninstall -g @angular/cli<br>
    npm cache verify<br>
    npm install -g  @angular/cli@latest<br></p>
  </blockquote>
  
  <p>For some reason I am having issues with the Angular software and associated packages despite my efforts. </p>
  
  <p>Any further suggestions are much appreciated!</p>