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

update Angular from v16 to v17 #2583

Closed
Tracked by #2581
tschaffter opened this issue Mar 21, 2024 · 6 comments · Fixed by #2591
Closed
Tracked by #2581

update Angular from v16 to v17 #2583

tschaffter opened this issue Mar 21, 2024 · 6 comments · Fixed by #2591

Comments

@tschaffter
Copy link
Member

No description provided.

@tschaffter
Copy link
Member Author

tschaffter commented Mar 21, 2024

Error shown during the migration.

 NX   Running migrations from 'migrations.json'
...
    Cannot update to Angular Material v17 because the project is using the legacy Material components
    that have been deleted. While Angular Material v16 is compatible with Angular v17, it is recommended
    to switch away from the legacy components as soon as possible because they no longer receive bug fixes,
    accessibility improvements and new features.
    
    Read more about migrating away from legacy components: https://material.angular.io/guide/mdc-migration
    
    Files in the project using legacy Material components:
     - /libs/openchallenges/ui/src/lib/discord-button/discord-button.component.ts
...

We are still using a legacy component. Re-doing the migration after commenting it out and using the latest component (button may not render well in the app; will be fixed later).

import { MatButtonModule } from '@angular/material/button';
// import { MatLegacyButtonModule as MatButtonModule } from '@angular/material/legacy-button';

@tschaffter
Copy link
Member Author

I get this error after reinstalling the Nx Spring Boot extension and trying to commit.

yarn add -D @nxrocks/nx-spring-boot@9.3.0

Error triggerred by Git hook:

$ git commit -m 'migrate to latest Nx and Angular'
Unable to create nodes for apps/openchallenges/api-gateway/build.gradle using plugin @nxrocks/nx-spring-boot. 

         Inner Error: Error: ENOENT: no such file or directory, open '/workspaces/sage-monorepo/build.gradle'
    at Object.openSync (node:fs:596:3)
    at readFileSync (node:fs:464:35)
    at getProjectFileContent (/workspaces/sage-monorepo/node_modules/@nxrocks/common/src/lib/workspace/utils.js:17:34)
    at checkProjectBuildFileContains (/workspaces/sage-monorepo/node_modules/@nxrocks/common-jvm/src/lib/utils/utils.js:171:76)
    at isBootProject (/workspaces/sage-monorepo/node_modules/@nxrocks/nx-spring-boot/src/utils/boot-utils.js:53:63)
    at /workspaces/sage-monorepo/node_modules/@nxrocks/common/src/lib/workspace/project-graph.js:87:14
    at buildProjectsConfigurationsFromProjectPathsAndPlugins (/workspaces/sage-monorepo/node_modules/nx/src/project-graph/utils/project-configuration-utils.js:146:25)
    at createProjectConfigurations (/workspaces/sage-monorepo/node_modules/nx/src/project-graph/utils/retrieve-workspace-files.js:89:156)
    at _retrieveProjectConfigurations (/workspaces/sage-monorepo/node_modules/nx/src/project-graph/utils/retrieve-workspace-files.js:61:12)
    at retrieveProjectConfigurations (/workspaces/sage-monorepo/node_modules/nx/src/project-graph/utils/retrieve-workspace-files.js:46:12)
    at async buildProjectGraphAndSourceMapsWithoutDaemon (/workspaces/sage-monorepo/node_modules/nx/src/project-graph/project-graph.js:73:69)
    at async createProjectGraphAndSourceMapsAsync (/workspaces/sage-monorepo/node_modules/nx/src/project-graph/project-graph.js:139:25)
    at async createProjectGraphAsync (/workspaces/sage-monorepo/node_modules/nx/src/project-graph/project-graph.js:128:39)
    at async Object.affected (/workspaces/sage-monorepo/node_modules/nx/src/command-line/affected/affected.js:33:26)

 NX   Unable to create nodes for apps/openchallenges/api-gateway/build.gradle using plugin @nxrocks/nx-spring-boot. 


         Inner Error: Error: ENOENT: no such file or directory, open '/workspaces/sage-monorepo/build.gradle'
    at Object.openSync (node:fs:596:3)
    at readFileSync (node:fs:464:35)
    at getProjectFileContent (/workspaces/sage-monorepo/node_modules/@nxrocks/common/src/lib/workspace/utils.js:17:34)
    at checkProjectBuildFileContains (/workspaces/sage-monorepo/node_modules/@nxrocks/common-jvm/src/lib/utils/utils.js:171:76)
    at isBootProject (/workspaces/sage-monorepo/node_modules/@nxrocks/nx-spring-boot/src/utils/boot-utils.js:53:63)
    at /workspaces/sage-monorepo/node_modules/@nxrocks/common/src/lib/workspace/project-graph.js:87:14
    at buildProjectsConfigurationsFromProjectPathsAndPlugins (/workspaces/sage-monorepo/node_modules/nx/src/project-graph/utils/project-configuration-utils.js:146:25)
    at createProjectConfigurations (/workspaces/sage-monorepo/node_modules/nx/src/project-graph/utils/retrieve-workspace-files.js:89:156)
    at _retrieveProjectConfigurations (/workspaces/sage-monorepo/node_modules/nx/src/project-graph/utils/retrieve-workspace-files.js:61:12)
    at retrieveProjectConfigurations (/workspaces/sage-monorepo/node_modules/nx/src/project-graph/utils/retrieve-workspace-files.js:46:12)
    at async buildProjectGraphAndSourceMapsWithoutDaemon (/workspaces/sage-monorepo/node_modules/nx/src/project-graph/project-graph.js:73:69)
    at async createProjectGraphAndSourceMapsAsync (/workspaces/sage-monorepo/node_modules/nx/src/project-graph/project-graph.js:139:25)
    at async createProjectGraphAsync (/workspaces/sage-monorepo/node_modules/nx/src/project-graph/project-graph.js:128:39)
    at async Object.affected (/workspaces/sage-monorepo/node_modules/nx/src/command-line/affected/affected.js:33:26)

husky - pre-commit hook exited with code 1 (error)

@tschaffter
Copy link
Member Author

Take 2

I have fixed the issue with the Nx spring boot plugin. Trying again the migration:

$ nx migrate --run-migrations

 NX   Running 'yarn' to make sure necessary packages are installed

...

 NX   Running migrations from 'migrations.json'

Ran update-16-8-0-cypress-13 from @nx/cypress
  Update to Cypress v13. Most noteable change is video recording is off by default. This migration will only update if the workspace is already on Cypress v12. https://docs.cypress.io/guides/references/migration-guide#Migrating-to-Cypress-130

  UPDATE package.json
---------------------------------------------------------
    Skipping migration for project agora-mongo. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project webapp-e2e. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project iatlas-data. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project iatlas-postgres. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-apex. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-api-docs. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-api-gateway. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-auth-service. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-challenge-service. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-challenge-to-elasticsearch-service. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-config-server. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-core-service. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-edam-etl. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-elasticsearch. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-grafana. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-image-service. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-kafka. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-kaggle-to-kafka-service. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-keycloak. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-mariadb. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-mongo. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-mysqld-exporter. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-notebook. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-organization-service. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-postgres. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-prometheus. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-rstudio. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-service-registry. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-thumbor. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-user-service. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-vault. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-zipkin. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project schematic-api. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project schematic-api-docs. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project schematic-notebook. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project synapse-rstudio. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project agora-home. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-about. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-api-client-angular. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-api-client-python. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-api-description. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-app-config-data. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-assets. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-challenge. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-challenge-search. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-config. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-home. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-kafka-admin. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-kafka-consumer. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-kafka-model. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-kafka-producer. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-not-found. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-org-profile. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-org-search. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-signup. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-styles. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-team. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-themes. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-ui. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-user-profile. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-util. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project schematic-api-client-python. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project schematic-api-description. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project shared-java-util. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project shared-typescript-assets. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project shared-typescript-styles. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project shared-typescript-themes. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project shared-typescript-util. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project shared-typescript-web-components. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project synapse-api-description. Unable to determine 'tsconfig.json' file in workspace config.
    
      ✓  Updated Angular Material to version 17
    
    Skipping migration for project agora-mongo. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project webapp-e2e. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project iatlas-data. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project iatlas-postgres. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-apex. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-api-docs. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-api-gateway. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-auth-service. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-challenge-service. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-challenge-to-elasticsearch-service. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-config-server. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-core-service. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-edam-etl. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-elasticsearch. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-grafana. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-image-service. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-kafka. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-kaggle-to-kafka-service. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-keycloak. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-mariadb. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-mongo. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-mysqld-exporter. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-notebook. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-organization-service. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-postgres. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-prometheus. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-rstudio. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-service-registry. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-thumbor. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-user-service. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-vault. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-zipkin. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project schematic-api. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project schematic-api-docs. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project schematic-notebook. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project synapse-rstudio. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project agora-home. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-about. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-api-client-angular. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-api-client-python. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-api-description. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-app-config-data. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-assets. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-challenge. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-challenge-search. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-config. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-home. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-kafka-admin. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-kafka-consumer. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-kafka-model. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-kafka-producer. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-not-found. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-org-profile. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-org-search. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-signup. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-styles. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-team. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-themes. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-ui. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-user-profile. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project openchallenges-util. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project schematic-api-client-python. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project schematic-api-description. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project shared-java-util. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project shared-typescript-assets. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project shared-typescript-styles. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project shared-typescript-themes. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project shared-typescript-util. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project shared-typescript-web-components. Unable to determine 'tsconfig.json' file in workspace config.
    Skipping migration for project synapse-api-description. Unable to determine 'tsconfig.json' file in workspace config.
    
      ✓  Updated Angular CDK to version 17
    
Ran 17.0.0-move-cache-directory from nx
  Updates the default cache directory to .nx/cache

  UPDATE .prettierignore
---------------------------------------------------------
Ran 17.0.0-use-minimal-config-for-tasks-runner-options from nx
  Use minimal config for tasksRunnerOptions

  UPDATE package.json
  UPDATE nx.json
---------------------------------------------------------
Ran update-17-0-0-rename-to-eslint from @nx/linter
  update-17-0-0-rename-to-eslint

  UPDATE package.json
  UPDATE apps/agora/webapp/project.json
  UPDATE apps/agora/webapp-e2e/project.json
  UPDATE apps/openchallenges/app/project.json
  UPDATE apps/openchallenges/infra/project.json
  UPDATE libs/agora/home/project.json
  UPDATE libs/openchallenges/about/project.json
  UPDATE libs/openchallenges/api-client-angular/project.json
  UPDATE libs/openchallenges/challenge/project.json
  UPDATE libs/openchallenges/challenge-search/project.json
  UPDATE libs/openchallenges/config/project.json
  UPDATE libs/openchallenges/home/project.json
  UPDATE libs/openchallenges/not-found/project.json
  UPDATE libs/openchallenges/org-profile/project.json
  UPDATE libs/openchallenges/org-search/project.json
  UPDATE libs/openchallenges/signup/project.json
  UPDATE libs/openchallenges/team/project.json
  UPDATE libs/openchallenges/ui/project.json
  UPDATE libs/openchallenges/user-profile/project.json
  UPDATE libs/openchallenges/util/project.json
  UPDATE libs/shared/typescript/util/project.json
  UPDATE libs/shared/typescript/web-components/project.json
---------------------------------------------------------

 NX   npmScope has been removed from nx.json

This will now be read from package.json
Old value which was in nx.json: sagebionetworks
New value from package.json: null
Typescript path mappings for new libraries will now be generated as such: new-lib instead of @sagebionetworks/new-lib
If you would like to change this back, change the name in package.json to @sagebionetworks/sage-monorepo

Ran rm-default-collection-npm-scope from nx
  Migration for v17.0.0-rc.1

  UPDATE nx.json
---------------------------------------------------------
Ran block-template-entities from @angular/core
  Angular v17 introduces a new control flow syntax that uses the @ and } characters. This migration replaces the existing usages with their corresponding HTML entities.

  UPDATE apps/agora/webapp/src/app/nx-welcome.component.ts
  UPDATE libs/openchallenges/ui/src/lib/person-card/person-card.component.html
  UPDATE libs/openchallenges/org-profile/src/lib/org-profile.component.html
  UPDATE libs/openchallenges/challenge/src/lib/challenge.component.html
---------------------------------------------------------
Ran update-17-0-0-remove-deprecated-build-options from @nx/js
  Remove deprecated build options

  UPDATE libs/openchallenges/api-client-angular/project.json
---------------------------------------------------------
Ran move-options-to-target-defaults from @nx/jest
  Move jest executor options to nx.json targetDefaults

  UPDATE nx.json
  UPDATE apps/agora/webapp/project.json
  UPDATE apps/openchallenges/app/project.json
  UPDATE apps/openchallenges/infra/project.json
  UPDATE libs/agora/home/project.json
  UPDATE libs/openchallenges/about/project.json
  UPDATE libs/openchallenges/api-client-angular/project.json
  UPDATE libs/openchallenges/challenge/project.json
  UPDATE libs/openchallenges/challenge-search/project.json
  UPDATE libs/openchallenges/config/project.json
  UPDATE libs/openchallenges/home/project.json
  UPDATE libs/openchallenges/not-found/project.json
  UPDATE libs/openchallenges/org-profile/project.json
  UPDATE libs/openchallenges/org-search/project.json
  UPDATE libs/openchallenges/signup/project.json
  UPDATE libs/openchallenges/team/project.json
  UPDATE libs/openchallenges/ui/project.json
  UPDATE libs/openchallenges/user-profile/project.json
  UPDATE libs/openchallenges/util/project.json
  UPDATE libs/shared/typescript/util/project.json
  UPDATE libs/shared/typescript/web-components/project.json
---------------------------------------------------------
Ran update-angular-cli-version-17-0-0 from @nx/angular
  Update the @angular/cli package version to ~17.0.0.

  UPDATE package.json
---------------------------------------------------------
Ran rename-browser-target-to-build-target from @nx/angular
  Rename 'browserTarget' to 'buildTarget'.

  UPDATE apps/agora/webapp/project.json
  UPDATE apps/openchallenges/app/project.json
---------------------------------------------------------
Ran replace-nguniversal-builders from @nx/angular
  Replace usages of '@nguniversal/builders' with '@angular-devkit/build-angular'.

  UPDATE apps/agora/webapp/project.json
  UPDATE apps/openchallenges/api-docs/project.json
  UPDATE apps/openchallenges/app/project.json
  UPDATE apps/openchallenges/auth-service/project.json
  UPDATE apps/openchallenges/challenge-to-elasticsearch-service/project.json
  UPDATE apps/openchallenges/core-service/project.json
  UPDATE apps/openchallenges/edam-etl/project.json
  UPDATE apps/openchallenges/kaggle-to-kafka-service/project.json
  UPDATE apps/openchallenges/mariadb/project.json
  UPDATE apps/openchallenges/notebook/project.json
  UPDATE apps/openchallenges/user-service/project.json
  UPDATE apps/schematic/api/project.json
  UPDATE package.json
---------------------------------------------------------
Ran replace-nguniversal-engines from @nx/angular
  Replace usages of '@nguniversal/' packages with '@angular/ssr'.

  CREATE apps/openchallenges/app/server.ts.bak
  UPDATE apps/openchallenges/app/server.ts
  CREATE apps/agora/webapp/server.ts.bak
  UPDATE apps/agora/webapp/server.ts
  UPDATE package.json
---------------------------------------------------------
Ran simplify-eslint-patterns from @nx/linter
  Simplify eslintFilePatterns

  UPDATE apps/agora/webapp/project.json
  UPDATE apps/agora/webapp-e2e/project.json
  UPDATE apps/openchallenges/app/project.json
  UPDATE apps/openchallenges/infra/project.json
  UPDATE libs/agora/home/project.json
  UPDATE libs/openchallenges/about/project.json
  UPDATE libs/openchallenges/api-client-angular/project.json
  UPDATE libs/openchallenges/challenge/project.json
  UPDATE libs/openchallenges/challenge-search/project.json
  UPDATE libs/openchallenges/config/project.json
  UPDATE libs/openchallenges/home/project.json
  UPDATE libs/openchallenges/not-found/project.json
  UPDATE libs/openchallenges/org-profile/project.json
  UPDATE libs/openchallenges/org-search/project.json
  UPDATE libs/openchallenges/signup/project.json
  UPDATE libs/openchallenges/team/project.json
  UPDATE libs/openchallenges/ui/project.json
  UPDATE libs/openchallenges/user-profile/project.json
  UPDATE libs/openchallenges/util/project.json
  UPDATE libs/shared/typescript/util/project.json
  UPDATE libs/shared/typescript/web-components/project.json
---------------------------------------------------------
Ran move-options-to-target-defaults from @nx/linter
  Move executor options to target defaults

  UPDATE apps/openchallenges/infra/project.json
  UPDATE nx.json
---------------------------------------------------------
Ran update-angular-cli-version-17-1-0 from @nx/angular
  Update the @angular/cli package version to ~17.1.0.

  UPDATE package.json
---------------------------------------------------------
Ran add-browser-sync-dependency from @nx/angular
  Add 'browser-sync' as dev dependency when '@angular-devkit/build-angular:ssr-dev-server' or '@nx/angular:module-federation-dev-ssr' is used.

  UPDATE package.json
---------------------------------------------------------
Ran add-autoprefixer-dependency from @nx/angular
  Add 'autoprefixer' as dev dependency when '@nx/angular:ng-packagr-lite' or '@nx/angular:package` is used.

  UPDATE package.json
---------------------------------------------------------
Ran 17-3-1-add-project-to-config from @nx/playwright
  Add project property to playwright config

  UPDATE apps/agora/webapp-e2e/playwright.config.ts
---------------------------------------------------------
Ran 18.0.0-disable-adding-plugins-for-existing-workspaces from nx
  Updates nx.json to disabled adding plugins when generating projects in an existing Nx workspace

  UPDATE nx.json
---------------------------------------------------------
Ran update-angular-cli-version-17-2-0 from @nx/angular
  Update the @angular/cli package version to ~17.2.0.

  UPDATE package.json
---------------------------------------------------------
Ran move-default-base-to-nx-json-root from nx
  Moves affected.defaultBase to defaultBase in `nx.json`

  UPDATE nx.json
---------------------------------------------------------

 NX   Running 'yarn' to make sure necessary packages are installed

...

 NX   Successfully finished running migrations from 'migrations.json'. This workspace is up to date!

vscode@39139cf83035:/workspaces/sage-monorepo$ 

@tschaffter
Copy link
Member Author

Updating OC

The good news is that removing the reference to the legacy button works file (Discord button).

Angular 17 replaces the Universal builder, which introduces some issues. The CSR server works fine.

$ nx serve-ssr openchallenges-app

...
Compiled successfully.
server.ts: 42729
** Angular Universal Live Development Server is listening on http://localhost:4200, open your browser on http://localhost:4200 **
NG02801: Angular detected that `HttpClient` is not configured to use `fetch` APIs. It's strongly recommended to enable `fetch` for applications that use Server-Side Rendering for better performance and compatibility. To enable `fetch`, add the `withFetch()` to the `provideHttpClient()` call at the root of the application.
Angular is running in development mode.
Angular is running in development mode.

@tschaffter
Copy link
Member Author

tschaffter commented Mar 22, 2024

Update

The container with SSR seems to work fine.

There are several issues with Agora boilerplate projects so I'm removing them.

The task lint fails on many projects:

   ✖  nx run openchallenges-app:lint
      Linting "openchallenges-app"...
      warning No cached ProjectGraph is available. The rule will be skipped.
                If you encounter this error as part of running standard `nx` commands then please open an issue on https://github.com/nrwl/nx
                @nx/enforce-module-boundaries
      
       NX   Cannot read properties of undefined (reading 'findProjectWithImport')
      
      Occurred while linting /workspaces/sage-monorepo/apps/openchallenges/app/e2e/challenge-search-paginator.spec.ts:1
      Rule: "@nx/enforce-module-boundaries"
      Pass --verbose to see the stacktrace.

UPDATE:

For now I will comment out this rule in eslintrc.json:

        // "@nx/enforce-module-boundaries": [
        //   "error",
        //   {
        //     "enforceBuildableLibDependency": true,
        //     "allow": [],
        //     "depConstraints": [
        //       {
        //         "sourceTag": "*",
        //         "onlyDependOnLibsWithTags": ["*"]
        //       }
        //     ]
        //   }
        // ]

@tschaffter
Copy link
Member Author

There is also an issue with eslint and the openchallenges-api-client-angular.

> nx run openchallenges-api-client-angular:lint


Linting "openchallenges-api-client-angular"...

 NX   All files matching the following patterns are ignored:

- 'libs/openchallenges/api-client-angular'

Please check your '.eslintignore' file.
Pass --verbose to see the stacktrace.

A solution is to remove the task lint for this project as there are no files to lint (we don't want to lint the code generated by OpenAPI Generator).

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

Successfully merging a pull request may close this issue.

1 participant