Is there a compatibility list for Angular / Angular-CLI and Node.js?

I periodically run into the problem, having to spin up old Angular projects with deprecated dependencies of Angular. Because I unsually run the latest Node.js version (at least lates LTS version) I often had the problem, that I wasn’t able to get the old projects running. I solved this by using a node version manager, … Read more

Error: Local workspace file (‘angular.json’) could not be found

I have travis-ci integrated with my GitHub account (https://github.com/pradeep0601/Angular5-Router-App). When I updated @angular/cli version from 1.7.4 to 6.0.0-rc.3, the build started failing with an error: Local workspace file (‘angular.json’) could not be found. Error: Local workspace file (‘angular.json’) could not be found. at WorkspaceLoader._getProjectWorkspaceFilePath (/home/travis/build/pradeep0601/Angular5-Router-App/node_modules/@angular/cli/models/workspace-loader.js:37:19) at WorkspaceLoader.loadWorkspace (/home/travis/build/pradeep0601/Angular5-Router-App/node_modules/@angular/cli/models/workspace-loader.js:24:21) at TestCommand._loadWorkspaceAndArchitect (/home/travis/build/pradeep0601/Angular5-Router-App/node_modules/@angular/cli/models/architect-command.js:177:32) at TestCommand.<anonymous> (/home/travis/build/pradeep0601/Angular5-Router-App/node_modules/@angular/cli/models/architect-command.js:45:25) at … Read more

When to use ‘npm start’ and when to use ‘ng serve’?

ng serve serves an Angular project via a development server   npm start runs an arbitrary command specified in the package’s “start” property of its “scripts” object. If no “start” property is specified on the “scripts” object, it will run node server.js. It seems like ng serve starts the embedded server whereas npm start starts … Read more

Angular CLI Error: The serve command requires to be run in an Angular project, but a project definition could not be found

When running the terminal commands ng server or ng serve –live-reload=true, I’m getting this issue: The serve command requires to be run in an Angular project, but a project definition could not be found. 43 Answers 43 I was also getting this issue and solved by running below command. ng update @angular/cli –migrate-only –from=<WhateverVersionYouAreCurrentlyOn> e.g. … Read more

How to set environment via `ng serve` in Angular 6

I am trying to update my Angular 5.2 app to Angular 6. I successfully followed instructions in the Angular update guide (including the update of angular-cli to v6), and now I am trying to serve the app via ng serve –env=local But this gives me error: Unknown option: ‘–env’ I use multiple environments (dev/local/prod), and … Read more