Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support nx 20 #145

Closed
JakubPawlak opened this issue Oct 15, 2024 · 8 comments
Closed

support nx 20 #145

JakubPawlak opened this issue Oct 15, 2024 · 8 comments

Comments

@JakubPawlak
Copy link

Recently nx@20 has been released.

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: @nx/[email protected]
npm ERR! node_modules/@nx/angular
npm ERR!   dev @nx/angular@"20.0.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @nx/angular@"^19.0.0" from @angular-architects/[email protected]
npm ERR! node_modules/@angular-architects/ddd
npm ERR!   @angular-architects/ddd@"*" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

Update would be great.

npx is not working due to some breaking changes in Nx.

 NX   Unable to resolve @angular-architects/ddd:domain.

Cannot find module '@angular-architects/ddd/package.json'
Require stack:
- /node_modules/nx/src/utils/package-json.js
- /node_modules/nx/src/project-graph/plugins/loader.js
- /node_modules/nx/src/project-graph/plugins/index.js
- /node_modules/nx/src/command-line/run/executor-utils.js
- /node_modules/nx/src/devkit-internals.js
- /node_modules/nx/src/utils/assert-workspace-validity.js
- /node_modules/nx/src/project-graph/build-project-graph.js
- /node_modules/nx/src/project-graph/project-graph.js
- /node_modules/nx/src/project-graph/file-utils.js
- /node_modules/nx/src/utils/package-manager.js
- /node_modules/nx/src/utils/child-process.js
- /node_modules/nx/src/command-line/migrate/command-object.js
- /node_modules/nx/src/command-line/nx-commands.js
- /node_modules/nx/bin/init-local.js
- /node_modules/nx/bin/nx.js
@rainerhahnekamp
Copy link

Hey, what happens if you force the installation? And what's the command you executed with npx? I guess something like npx nx...?

@JakubPawlak
Copy link
Author

JakubPawlak commented Oct 15, 2024

After running the script with forced installation, I'm getting the following stacktrace:

 nx g @angular-architects/ddd:domain something --directory test-domain --verbose

 NX  Generating @angular-architects/ddd:domain

✔ Would you like to add an associated application? (y/N) · false

 NX   Cannot read properties of undefined (reading 'replace')

TypeError: Cannot read properties of undefined (reading 'replace')
    at removeWindowsDriveLetter (/node_modules/nx/src/utils/path.js:9:27)
    at normalizePath (/node_modules/nx/src/utils/path.js:16:12)
    at determineProjectNameAndRootOptions (/node_modules/@nx/devkit/src/generators/project-name-and-root-utils.js:10:58)
    at normalizeOptions (/node_modules/@nx/angular/src/generators/library/lib/normalize-options.js:26:151)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async libraryGenerator (/node_modules/@nx/angular/src/generators/library/library.js:38:21)

Without passing directory attribute the issue is the same.

@JakubPawlak
Copy link
Author

Oh, I didn't provide the original command. That was the same as above:
npx nx g @angular-architects/ddd:domain something --directory test-domain

@scsete
Copy link

scsete commented Oct 23, 2024

I have the same issue.

Angular: 18.2.0
pnpm
Nx: 20.0.2
@angular-architects/ddd:19.0.1

It looks like the same as it was described in the other issue #134.

@wizardnet972
Copy link

In version 20, Nx is transitioning to using eslint.config.js.

@L-X-T
Copy link
Collaborator

L-X-T commented Oct 31, 2024

Hello @JakubPawlak, @scsete, I'm going to jump in to support @manfredsteyer maintaining this package.

Any ideas on how we can resolve this issue?

@L-X-T
Copy link
Collaborator

L-X-T commented Nov 3, 2024

Hi guys,

I'm now a collaborator of this project. The problem we're facing is this:

In Nx 20, generating projects will no longer derive the name and root.
Please provide the exact project name and root in the future.

So we need to change the way the nx generators are being called under the hood.

@L-X-T
Copy link
Collaborator

L-X-T commented Dec 2, 2024

Hi everybody, the support for Nx20 is finally ready.

Please update to version 18.1.0 to test it :-)

@L-X-T L-X-T closed this as completed Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants