ng serve Unable to find “@angular/cli” in devDependencies

折月煮酒 提交于 2019-12-06 13:43:15

问题


$ 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!