角从13.3.8恢复到13.3.7

发布于 2025-01-28 16:54:20 字数 547 浏览 4 评论 0原文

当我运行时:

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

enter image description here

I checked the install and I only see 13.3.5 for @angular/cli

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

清引 2025-02-04 16:54:20

版本报告中的所有内容都是全局版本,除了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

我一直都在从未离去 2025-02-04 16:54:20

@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.5

Locally:

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.5

Runnpm install

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文