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

Routing file (apps/host/src/app/app.routes.ts) does not a routing configuration when generating new remote #12707

Closed
gytislaz opened this issue Oct 19, 2022 · 1 comment · Fixed by #12829
Assignees
Labels
outdated scope: angular Issues related to Angular support in Nx type: bug

Comments

@gytislaz
Copy link

Current Behavior

When generating new angular remote with host specified this error appears: Routing file (apps/host/src/app/app.routes.ts) does not a routing configuration. Please ensure the parent contains a routing configuration.

For angular application we are using app.routes.ts file that has a const with a type Routes (https://github.com/angular/angular/blob/main/packages/router/src/models.ts#L27). However @nrwl/angular:remote only works when routes const is of type Route[]. Since Routes and Route[] are practically the same thing generator should support both.

Expected Behavior

@nrwl/angular:remote should work even when app.routes.ts routes type is Routes. It was working before nx 15 update.

Steps to Reproduce

Repository to use for reproduction: https://github.com/gytislaz/nx-workspace-example
Try to generate new remote app and specify host that uses Routes type in app.routes.ts file.
For example: npx nx generate @nrwl/angular:remote remote --host=host --no-interactive --dry-run

Failure Logs

Routing file (apps/host/src/app/app.routes.ts) does not a routing configuration. Please ensure the parent contains a routing configuration.

Environment

Node : 16.17.0
OS : darwin arm64
npm : 8.15.0

nx : 15.0.0
@nrwl/angular : 15.0.0
@nrwl/cypress : 15.0.0
@nrwl/detox : Not Found
@nrwl/devkit : 15.0.0
@nrwl/esbuild : Not Found
@nrwl/eslint-plugin-nx : 15.0.0
@nrwl/expo : Not Found
@nrwl/express : Not Found
@nrwl/jest : 15.0.0
@nrwl/js : 15.0.0
@nrwl/linter : 15.0.0
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : Not Found
@nrwl/nx-cloud : 15.0.0
@nrwl/nx-plugin : Not Found
@nrwl/react : Not Found
@nrwl/react-native : Not Found
@nrwl/rollup : Not Found
@nrwl/schematics : Not Found
@nrwl/storybook : 15.0.0
@nrwl/web : Not Found
@nrwl/webpack : 15.0.0
@nrwl/workspace : 15.0.0
typescript : 4.8.4

@github-actions
Copy link

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 Mar 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated scope: angular Issues related to Angular support in Nx type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants