问题
$ ng serve Unable to find "@angular/cli" in devDependencies.
Please take the following steps to avoid issues: "npm install --save-dev @angular/cli@latest" You seem to not be depending on "@angular/core". This is an error.
in the backend(symfony) is run corretly but I had this error in angular js frontend when i want to run my server can someone have a idea why and how i solve
回答1:
This may happen if you aren't in you root directory of your application. This can happen if you created a new project with the command ng new project-name
and then try to run serve command without actually entering the created project directory.
1. Create a new project $ ng new project-name
2. Enter the project directory $ cd project-name
3. Only now run $ ng serve
来源:https://stackoverflow.com/questions/48129772/ng-serve-unable-to-find-angular-cli-in-devdependencies