【问题标题】:Cannot find generator 'init' in ionic/capacitor with nx在带有 nx 的离子/电容器中找不到发生器 \'init\'
【发布时间】:2022-08-14 09:43:13
【问题描述】:

我正在尝试使用离子电容器创建 nx 工作区。

  1. 能够创建 nx 工作区 -> 成功
  2. 能够安装npm install --save-dev @nxtend/ionic-angular -> 成功
  3. nx 生成 @nxtend/ionic-angular:init -> 失败

    Unable to resolve @nxtend/ionic-angular:init. Cannot find generator \'init\' in node_modules/@nxtend/ionic-angular/generators.json.

    NX 报告说:

      Node : 16.10.0
      OS   : darwin x64
      npm  : 7.24.0
      
      nx : 13.0.0
      @nrwl/angular : 13.10.6
      @nrwl/cli : 13.0.0
      @nrwl/cypress : 13.10.6
      @nrwl/devkit : 13.0.0
      @nrwl/eslint-plugin-nx : Not Found
      @nrwl/express : Not Found
      @nrwl/jest : 13.0.0
      @nrwl/linter : 13.0.0
      @nrwl/nest : Not Found
      @nrwl/next : Not Found
      @nrwl/node : Not Found
      @nrwl/nx-cloud : 14.2.0
      @nrwl/react : Not Found
      @nrwl/schematics : Not Found
      @nrwl/tao : 13.0.0
      @nrwl/web : Not Found
      @nrwl/workspace : 13.0.0
      @nrwl/storybook : 13.10.6
      @nrwl/gatsby : Not Found
      typescript : 4.3.5
    

    我遵循本教程: https://ionicframework.com/blog/ionic-angular-monorepos-with-nx/

    Edited:

    1. npx create-nx-workspace@13.0.0 -> Success
    2. npm install --save-dev @nxtend/ionic-angular -> Success

      但是得到这个

      对于最新的工作区版本,会出现这样的版本依赖错误:

      1. npx create-nx-workspace -> Success
      2. npm install --save-dev @nxtend/ionic-angular -> Failed

        谢谢。

    标签: angular ionic-framework monorepo


    【解决方案1】:

    这是与nrwl/nx-labs 相关的已知问题:

    1. https://github.com/nrwl/nx/issues/10776
    2. https://github.com/nrwl/nx-labs/issues/85

      app-root 已被删除,不再需要。
      nrwl/nx-labs 的 v14.4.2 版本应该修复它。

    【讨论】:

      猜你喜欢
      • 2020-09-23
      • 2019-09-02
      • 2019-11-14
      • 1970-01-01
      • 2020-07-09
      • 2018-05-30
      • 2020-02-17
      • 2019-01-13
      • 1970-01-01
      相关资源
      最近更新 更多