NX从V11升级到v12.10.1是未找到的“模块”。迁移期间的错误

发布于 2025-02-06 20:11:04 字数 2785 浏览 2 评论 0原文

我目前在项目中使用Angular 11使用NX版本11。我正在尝试将NX升级到v12.10.1。我相信这是NX在我的项目中使用Angular 12的最后更新。到目前为止,这就是我所做的。

  1. 将节点更新为v18.3.0

  2. 将NPM更新为v8.11.0

  3. 运行命令NPX NX迁移12.10.1

Fetching meta data about packages.
It may take a few minutes.
Fetching @nrwl/[email protected]
Fetching @nrwl/[email protected]
Fetching @nrwl/[email protected]
Fetching @nrwl/[email protected]
Fetching @nrwl/[email protected]
Fetching @ngrx/[email protected]
Fetching @ngrx/[email protected]
Fetching @ngrx/[email protected]
Fetching @angular/[email protected]
Fetching @angular/[email protected]
Fetching @angular/[email protected]
Fetching @angular/[email protected]
Fetching @ngrx/[email protected]
Fetching @angular/cli@~12.2.0
  1. 无错误。因此,继续。

  2. rm -rf node_modules/package -lock.json进行新的安装。

  3. 新鲜NPM安装

  4. 运行命令NPX NX迁移 - 运行移民

  5. 出现错误,例如代码:module_not_found。 “找不到模块 @nrwl/tao/src/utils/app-root”。屏幕截图附加了。

关于如何解决此问题的任何想法?

I am currently on Nx version 11 using Angular 11 in my project. I am trying to upgrade Nx to v12.10.1. I believe it is the last update of Nx to use Angular 12 in my project. So far, here is what I did.

  1. Update Node to v18.3.0

  2. Update NPM to v8.11.0

  3. Run command npx nx migrate 12.10.1

Fetching meta data about packages.
It may take a few minutes.
Fetching @nrwl/[email protected]
Fetching @nrwl/[email protected]
Fetching @nrwl/[email protected]
Fetching @nrwl/[email protected]
Fetching @nrwl/[email protected]
Fetching @ngrx/[email protected]
Fetching @ngrx/[email protected]
Fetching @ngrx/[email protected]
Fetching @angular/[email protected]
Fetching @angular/[email protected]
Fetching @angular/[email protected]
Fetching @angular/[email protected]
Fetching @ngrx/[email protected]
Fetching @angular/cli@~12.2.0
  1. No errors. Hence, continue.

  2. rm -rf node_modules/ package-lock.json To do it fresh installation.

  3. fresh npm install

  4. Run command npx nx migrate --run-migrations

  5. Got an error as code: MODULE_NOT_FOUND. "Cannot find module @nrwl/tao/src/utils/app-root". screenshot attached. Nx module not found error

Any ideas on how to fix this?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文