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

Nx 19 not working with Angular 18.0.0-rc. The "path" argument must be of type string. Received undefined #23213

Closed
1 of 4 tasks
Fafnur opened this issue May 7, 2024 · 2 comments

Comments

@Fafnur
Copy link

Fafnur commented May 7, 2024

Current Behavior

Nx doesn't work with Angular 18.0.0-rc. An error appears when starting the project:

> nx run simple-web:serve:development


 NX   Unable to resolve @angular-devkit/build-angular:application.

The "path" argument must be of type string. Received undefined

Error: Unable to resolve @angular-devkit/build-angular:application.
The "path" argument must be of type string. Received undefined
    at WrappedWorkspaceNodeModulesArchitectHost.readExecutor (/mnt/Storage/Development/angular/simple/node_modules/nx/src/adapter/ngcli-adapter.js:840:23)
    at WrappedWorkspaceNodeModulesArchitectHost.resolveBuilder (/mnt/Storage/Development/angular/simple/node_modules/nx/src/adapter/ngcli-adapter.js:793:38)
    at name (/mnt/Storage/Development/angular/simple/node_modules/@angular-devkit/architect/src/architect.js:220:40)
    at Observable._subscribe (/mnt/Storage/Development/angular/simple/node_modules/@angular-devkit/architect/src/jobs/create-job-handler.js:104:26)
    at Observable._trySubscribe (/mnt/Storage/Development/angular/simple/node_modules/rxjs/dist/cjs/internal/Observable.js:41:25)
    at /mnt/Storage/Development/angular/simple/node_modules/rxjs/dist/cjs/internal/Observable.js:35:31
    at Object.errorContext (/mnt/Storage/Development/angular/simple/node_modules/rxjs/dist/cjs/internal/util/errorContext.js:22:9)
    at Observable.subscribe (/mnt/Storage/Development/angular/simple/node_modules/rxjs/dist/cjs/internal/Observable.js:26:24)
    at /mnt/Storage/Development/angular/simple/node_modules/rxjs/dist/cjs/internal/operators/switchMap.js:17:63
    at OperatorSubscriber._this._next (/mnt/Storage/Development/angular/simple/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js:33:21)

Expected Behavior

The app should run without errors

GitHub Repo

https://github.com/Fafnur/nx-anugular-18-rc-issue

Steps to Reproduce

  1. Create a new workspace (yarn create nx-workspace (select angular, set name angular project, select ssr, skip nx cloud)

Screenshot from 2024-05-07 18-35-52

p.s. Angular 17.* is work fine.

Screenshot from 2024-05-07 18-37-44

  1. Update angular vendors to 18.0.0-rc.0

Screenshot from 2024-05-07 18-50-57

  1. Serve angular project

Screenshot from 2024-05-07 18-40-04

Nx Report

Node   : 20.12.2
OS     : linux-x64
yarn   : 1.22.22

nx                 : 19.0.0
@nx/js             : 19.0.0
@nx/jest           : 19.0.0
@nx/linter         : 19.0.0
@nx/eslint         : 19.0.0
@nx/workspace      : 19.0.0
@nx/angular        : 19.0.0
@nx/devkit         : 19.0.0
@nx/eslint-plugin  : 19.0.0
@nrwl/tao          : 19.0.0
@nx/web            : 19.0.0
@nx/webpack        : 19.0.0
typescript         : 5.4.5

Done in 0.31s.

Failure Logs

The "path" argument must be of type string. Received undefined

Error: Unable to resolve @angular-devkit/build-angular:application.
The "path" argument must be of type string. Received undefined
    at WrappedWorkspaceNodeModulesArchitectHost.readExecutor (/mnt/Storage/Development/angular/simple/node_modules/nx/src/adapter/ngcli-adapter.js:840:23)
    at WrappedWorkspaceNodeModulesArchitectHost.resolveBuilder (/mnt/Storage/Development/angular/simple/node_modules/nx/src/adapter/ngcli-adapter.js:793:38)
    at name (/mnt/Storage/Development/angular/simple/node_modules/@angular-devkit/architect/src/architect.js:220:40)
    at Observable._subscribe (/mnt/Storage/Development/angular/simple/node_modules/@angular-devkit/architect/src/jobs/create-job-handler.js:104:26)
    at Observable._trySubscribe (/mnt/Storage/Development/angular/simple/node_modules/rxjs/dist/cjs/internal/Observable.js:41:25)
    at /mnt/Storage/Development/angular/simple/node_modules/rxjs/dist/cjs/internal/Observable.js:35:31
    at Object.errorContext (/mnt/Storage/Development/angular/simple/node_modules/rxjs/dist/cjs/internal/util/errorContext.js:22:9)
    at Observable.subscribe (/mnt/Storage/Development/angular/simple/node_modules/rxjs/dist/cjs/internal/Observable.js:26:24)
    at /mnt/Storage/Development/angular/simple/node_modules/rxjs/dist/cjs/internal/operators/switchMap.js:17:63
    at OperatorSubscriber._this._next (/mnt/Storage/Development/angular/simple/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js:33:21)

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

On [email protected] at same

@leosvelperez
Copy link
Member

leosvelperez commented May 7, 2024

Thanks for reporting this!

Angular 18 is still not supported by Nx (see supported versions). Note that Angular 18 is still not released (you're trying a pre-release version). We are already working on adding support for it (#22509), so shortly after the Angular 18 stable version is out, Nx will have support for it.

Copy link

github-actions bot commented Jun 7, 2024

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants