Angular 卡在8个角度的错误循环中
看来,我陷入了一个无限的角度误差循环中。我将本地angular版本从1.7.0更新为angular 8。我的全局角度版本已经是8了。在将angular版本更新为8之后,我运行了下面的命令Angular 卡在8个角度的错误循环中,angular,asp.net-core,Angular,Asp.net Core,看来,我陷入了一个无限的角度误差循环中。我将本地angular版本从1.7.0更新为angular 8。我的全局角度版本已经是8了。在将angular版本更新为8之后,我运行了下面的命令 ng serve 我的错误是 "The serve command requires to be run in an Angular project, but a project definition could not be found" `"Repository is not clean. Ple
ng serve
我的错误是
"The serve command requires to be run in an Angular project, but a project definition could not be found"
`"Repository is not clean. Please commit or stash any changes before updating.".`
"Repository is not clean. Please commit or stash any changes before updating"
"The serve command requires to be run in an Angular project, but a project definition could not be found."
在谷歌搜索了这个问题后,我在终端窗口中运行了这个命令
"ng update @angular/cli --migrate-only --from=1.7.0".
在运行这个命令之后,我得到了这样一个错误
"The serve command requires to be run in an Angular project, but a project definition could not be found"
`"Repository is not clean. Please commit or stash any changes before updating.".`
"Repository is not clean. Please commit or stash any changes before updating"
"The serve command requires to be run in an Angular project, but a project definition could not be found."
为了修复错误,我运行了以下命令
ng update --all --force.
我又犯了一个错误,说
"The serve command requires to be run in an Angular project, but a project definition could not be found"
`"Repository is not clean. Please commit or stash any changes before updating.".`
"Repository is not clean. Please commit or stash any changes before updating"
"The serve command requires to be run in an Angular project, but a project definition could not be found."
所以我运行了这个命令
ng update -all --force --allow-dirty.
当我运行上述命令时,我收到以下消息:
Repository is not clean. Update changes will be mixed with pre-existing changes.
Using package manager: 'npm'
Collecting installed dependencies...
Found 35 dependencies.
Package '-l' is not a dependency.
在这之后,我又这样做了
ng serve
我又犯了一个错误,说
"The serve command requires to be run in an Angular project, but a project definition could not be found"
`"Repository is not clean. Please commit or stash any changes before updating.".`
"Repository is not clean. Please commit or stash any changes before updating"
"The serve command requires to be run in an Angular project, but a project definition could not be found."
我愿意回到angular版本7,但不确定这是否有帮助。下面是我在做ng时看到的图像——版本
在此方面的任何帮助都将不胜感激。有一个命令允许绕过git状态检查
ng update @angular/cli --allow-dirty
更新正在检查未提交的文件,并且失败了,因为如果更新在没有清除状态的情况下继续进行,可能会给自己带来一些麻烦。
即将到来的日期将只检查角度文件
否则,请隐藏或提交您的工作,然后再次运行update命令。您正在从1.7.0版更新到8版或从7版更新到8版?mate您是否确定您在服务时处于您的角度项目中?请检查终端-->cd yourAngularProjectPath/中的路径,然后尝试从1.7.0到8进行ng servefrom。我的全局版本已经是8了,但是我的本地版本显示了1.7.0。我不知道为什么它会显示这个版本,但当我制作ng-version时,我得到了1.7.0。