角从13.3.8恢复到13.3.7
当我运行时:
ng v
我在屏幕截图中获取版本。 “ Angular:13.3.8”在哪里,如何将其还原为13.3.7?
另外,包装在此屏幕截图中来自哪里?它们与我的packages.json
我检查了安装,我只看到 @angular/cli
When I run :
ng v
I get the version in the screenshot. Where does "Angular: 13.3.8" come from and how can I revert it to 13.3.7 ?
Also, where do the Packages come from in this screenshot? They differ from my packages.json
I checked the install and I only see 13.3.5 for @angular/cli
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
版本报告中的所有内容都是全局版本,除了
Angular
版本。对于Windows,全局文件位于:
c:\ users \ yourname \ appdata \ roaming \ npm \ node_modules \@gangular \
它们通常使用全局标志
-g
例如:
npm install -g @angular/cli
仅在运行
ng v <
npm install -g @angular/cli
。 /代码>在项目中。如果您打开 lock-file < / strong>(package-lock.json / yarn.lock / ...取决于您的软件包管理器),您会注意到自己将在其中拥有13.3.8版。
在软件包中。然后只需在软件包管理器上再次运行安装:
npm install
Everything in the version report are global versions, except for the
Angular
version.For windows the global files are located in:
C:\Users\yourname\AppData\Roaming\npm\node_modules\@angular\
They are usually installed using the global flag
-g
e.g.:
npm install -g @angular/cli
The angular version is only filled in if you run
ng v
inside a project.If you open your lock-file (package-lock.json / yarn.lock / ... depending on your package manager), you will notice you will have version 13.3.8 in there.
In the package.json you will probably find something like
^13.3.5
remove the^
if you want that specific version for some reason. Then just run install again with your package manager:npm install
@H3AR7B3A7是正确的。这是我为解决它所做的。我决定在各地强制执行v13.3.5,因为在全球范围内不同步时会导致问题
:
删除c:\ users \ yours \ yourname \ appdata \ appdata \ roaming \ npm \ npm \ node_modules@
anguarl npm ig @angular/ [email&nbsp; procectioned] v13.3.5
本地:
。
通过运行
rm node_modules
delete.cache delete .cache
delete .angular
确保所有软件包的引用 角为13.3.5
运行
npm i @angular/ a>
- v13.3.5的本地安装npm安装
@H3AR7B3A7 was correct. Here's what I did to solve it. I decided to enforce v13.3.5 everywhere as that was causing issues when not in sync
Globally:
Delete the C:\Users\yourname\AppData\Roaming\npm\node_modules@angular\ folder
Run
npm i g @angular/[email protected]
- Global install of v13.3.5Locally:
Delete the package-lock.json
Delete the local node_modules by running
rm node_modules
Delete .cache
Delete .angular
Make sure all package.json references to @angular were 13.3.5
Run
npm i @angular/[email protected]
- Local install of v13.3.5Run
npm install