Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

nx 14 support #628

Open
reinvanleirsberghe opened this issue May 6, 2022 · 10 comments · May be fixed by #638
Open

nx 14 support #628

reinvanleirsberghe opened this issue May 6, 2022 · 10 comments · May be fixed by #638

Comments

@reinvanleirsberghe
Copy link

NX has been updated to 14.
Support for this version would be great!

Keep up the good work :)

@Markus-Ende
Copy link

Markus-Ende commented May 13, 2022

For a quick work-around until this is resolved you can try overriding the dependencies:

"overrides": {
    "@nxtend/capacitor": {
      "@nrwl/devkit": "$@nrwl/devkit"
    },
    "@nxtend/ionic-angular": {
      "@nrwl/devkit": "$@nrwl/devkit"
    }
  }

We had to do this, because otherwise nx v13 is installed as a sub-dependecy which broke installation scripts.

(this might not work for every package, of course, but seems to do it for our use cases)

@rhutchison rhutchison linked a pull request Jul 9, 2022 that will close this issue
5 tasks
@Destreyf
Copy link

Destreyf commented Jul 14, 2022

I see that the PR changes are approved by @rapzo I wonder what the ETA is for getting a version cut with this functionality?

Currently I cannot use the application generator due to the following error:

$ nx generate @nxtend/ionic-angular:application mobile --verbose

>  NX  Generating @nxtend/ionic-angular:application

✔ Which starter template would you like to use? · blank

 >  NX   Cannot find module 'nx/src/utils/app-root'

   Require stack:
   - ~/projects/project-name/node_modules/@nxtend/ionic-angular/node_modules/@nrwl/devkit/index.js
   - ~/projects/project-name/node_modules/@nxtend/ionic-angular/src/generators/application/generator.js
   - ~/projects/project-name/node_modules/nx/src/config/workspaces.js
   - ~/projects/project-name/node_modules/nx/src/command-line/generate.js
   - ~/projects/project-name/node_modules/nx/src/command-line/nx-commands.js
   - ~/projects/project-name/node_modules/nx/bin/init-local.js
   - ~/projects/project-name/node_modules/nx/bin/nx.js
   - ~/.nvm/versions/node/v16.15.1/lib/node_modules/nx/bin/nx.js

Error: Cannot find module 'nx/src/utils/app-root'
Require stack:
- ~/projects/project-name/node_modules/@nxtend/ionic-angular/node_modules/@nrwl/devkit/index.js
- ~/projects/project-name/node_modules/@nxtend/ionic-angular/src/generators/application/generator.js
- ~/projects/project-name/node_modules/nx/src/config/workspaces.js
- ~/projects/project-name/node_modules/nx/src/command-line/generate.js
- ~/projects/project-name/node_modules/nx/src/command-line/nx-commands.js
- ~/projects/project-name/node_modules/nx/bin/init-local.js
- ~/projects/project-name/node_modules/nx/bin/nx.js
- ~/.nvm/versions/node/v16.15.1/lib/node_modules/nx/bin/nx.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (~/projects/project-name/node_modules/@nxtend/ionic-angular/node_modules/@nrwl/devkit/index.js:182:18)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)

I am looking at developing an Ionic App, and am looking forward to being able to integrate it within our monorepo.

@rapzo
Copy link

rapzo commented Jul 15, 2022

Hold on! I'm not part of the team! ahah
I only cloned the PR, tested it and worked for me, but I don't know the standards here. But just tried to ease the owners' lives.
You can always use that fork's version until this gets sorted.

@Destreyf
Copy link

I see! Sorry about that @rapzo. I was a bit hasty in my assumptions.

@rapzo
Copy link

rapzo commented Jul 15, 2022

No worries mate. Just clarified so you don't get high hopes about the review. But i trust the maintainers will address it soon because there's a hellova job in that PR.

@sagarkm
Copy link

sagarkm commented Jul 20, 2022

@Markus-Ende Apologies for the ignorance but where do we make these changes? In which file?

@Markus-Ende
Copy link

@Markus-Ende Apologies for the ignorance but where do we make these changes? In which file?

in package.json, see https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides for details

@walebey
Copy link

walebey commented Aug 1, 2022

Is a release date for ver. 14 out now? Still get the error, despite the suggested fix.

@Destreyf
Copy link

Destreyf commented Aug 1, 2022

@walebey No there's no fix released, the users you see here have been running patches/patched versions of the project in order to get it to install/run.

From my understanding @rhutchison worked on a PR #638 which fixes the issue(s), but it hasn't been merged in yet, it sounds like they talked with @devinshoemaker about something but I haven't seen any discussions around this.

I am running the changes in #638 without issue currently, I build the libraries myself and pointed my install(s) of the packages to a local copy that I'm maintaining.

It would be great to see an update around this. Also capacitor v4 was released a few days ago.

@devinshoemaker
Copy link
Collaborator

These plugins are moving over to the Nxext repo, and an Nx 14 version has been released. There are some migration guides on their docs site, here's a link to the Ionic Angular guide: https://nxext.dev/docs/ionic-angular/migrating-from-nxtend.html

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants