nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
23.51k stars 2.34k forks source link

Schema validation fails for Test command after Nx 13 migration #7654

Closed newmankyle closed 2 years ago

newmankyle commented 2 years ago

Current Behavior

The test command fails when running against any project in my workspace. It seems like moving the tag and implicitDependencies properties over to angular.json causes schema validation to fail. I get the following error:

"JestRunnerSchema" schema is using the keyword "id" which its support is deprecated. Use "$id" for schema ID.
Schema validation failed with the following errors:
  Data path ".projects['<my-app-project>']" should NOT have additional properties(tags).

Note that I only get these errors when running the test command. Build, storybook and others are still fine.

Expected Behavior

Steps to Reproduce

Here is my current package.json dependencies:

"dependencies": {
    "@angular/animations": "12.2.0",
    "@angular/cdk": "12.2.0",
    "@angular/common": "12.2.0",
    "@angular/compiler": "12.2.0",
    "@angular/core": "12.2.0",
    "@angular/flex-layout": "^12.0.0-beta.35",
    "@angular/forms": "12.2.0",
    "@angular/material": "12.2.0",
    "@angular/platform-browser": "12.2.0",
    "@angular/platform-browser-dynamic": "12.2.0",
    "@angular/router": "12.2.0",
    "@material-icons/svg": "^1.0.17",
    "@ngrx/component-store": "12.5.1",
    "@nrwl/angular": "13.1.3",
    "ag-grid-angular": "^25.0.1",
    "ag-grid-community": "^25.0.1",
    "ag-grid-enterprise": "^25.0.1",
    "angular-froala-wysiwyg": "^4.0.5",
    "angular-gridster2": "^11.0.0",
    "angular-split": "^5.0.0",
    "material-design-icons-iconfont": "^6.1.0",
    "ng-zorro-antd": "^11.4.2",
    "ngx-autosize-input": "^11.0.5",
    "ngx-mat-select-search": "^3.3.0",
    "normalize.css": "^8.0.1",
    "roboto-fontface": "^0.10.0",
    "rxjs": "^6.6.3",
    "zone.js": "0.11.4"
  },
  "devDependencies": {
    "@angular-builders/jest": "^10.0.1",
    "@angular-devkit/build-angular": "12.2.13",
    "@angular-eslint/builder": "^1.2.0",
    "@angular-eslint/eslint-plugin": "12.3.1",
    "@angular-eslint/eslint-plugin-template": "12.3.1",
    "@angular-eslint/schematics": "1.2.0",
    "@angular-eslint/template-parser": "12.3.1",
    "@angular/cli": "12.2.13",
    "@angular/compiler-cli": "12.2.0",
    "@angular/language-service": "12.2.0",
    "@babel/core": "^7.11.6",
    "@babel/plugin-transform-typescript": "^7.12.1",
    "@compodoc/compodoc": "^1.1.11",
    "@cypress/browserify-preprocessor": "^3.0.1",
    "@nrwl/cli": "13.1.3",
    "@nrwl/cypress": "13.1.3",
    "@nrwl/eslint-plugin-nx": "13.1.3",
    "@nrwl/jest": "13.1.3",
    "@nrwl/storybook": "13.1.3",
    "@nrwl/tao": "13.1.3",
    "@nrwl/workspace": "13.1.3",
    "@storybook/addon-actions": "^6.3.8",
    "@storybook/addon-essentials": "^6.3.8",
    "@storybook/addon-links": "^6.3.8",
    "@storybook/angular": "^6.3.8",
    "@storybook/builder-webpack5": "~6.3.0",
    "@storybook/cli": "^6.3.8",
    "@storybook/manager-webpack5": "~6.3.0",
    "@types/cypress-cucumber-preprocessor": "^4.0.0",
    "@types/dot": "^1.1.4",
    "@types/jest": "27.0.2",
    "@types/node": "14.14.33",
    "@types/uuid": "^8.0.0",
    "@types/webpack": "4.41.21",
    "@typescript-eslint/eslint-plugin": "^4.19.0",
    "@typescript-eslint/experimental-utils": "^4.15.1",
    "@typescript-eslint/parser": "^4.19.0",
    "angular-material-css-vars": "^2.1.2",
    "babel-loader": "^8.1.0",
    "cypress": "^8.7.0",
    "cypress-cucumber-preprocessor": "^4.0.0",
    "dotenv": "10.0.0",
    "eslint": "^7.22.0",
    "eslint-config-prettier": "^8.1.0",
    "eslint-plugin-cypress": "^2.11.2",
    "eslint-plugin-import": "^2.22.1",
    "eslint-plugin-jsdoc": "^32.0.2",
    "eslint-plugin-prefer-arrow": "^1.2.3",
    "jest": "27.2.3",
    "jest-junit": "^11.1.0",
    "jest-preset-angular": "10.0.1",
    "json-schema-to-typescript": "^9.1.1",
    "ng-packagr": "12.2.5",
    "postcss": "^8.3.9",
    "postcss-import": "^14.0.2",
    "postcss-preset-env": "^6.7.0",
    "postcss-url": "^10.1.1",
    "prettier": "2.3.1",
    "react-is": "^16.13.1",
    "resolve": "^1.19.0",
    "ts-jest": "27.0.5",
    "ts-node": "~9.1.1",
    "tsconfig-paths-webpack-plugin": "^3.3.0",
    "tslib": "^2.0.0",
    "typescript": "4.3.5",
    "wait-on": "^5.0.0"
  }

This issue may not be prioritized if details are not provided to help us reproduce the issue.

Failure Logs

Environment

>  NX  Report complete - copy this into the issue template

  Node : 16.13.0
  OS   : win32 x64
  yarn : 3.0.2

  nx : 13.1.3
  @nrwl/angular : 13.1.3
  @nrwl/cli : 13.1.3
  @nrwl/cypress : 13.1.3
  @nrwl/devkit : 13.1.3
  @nrwl/eslint-plugin-nx : 13.1.3
  @nrwl/express : Not Found
  @nrwl/jest : 13.1.3
  @nrwl/linter : 13.1.3
  @nrwl/nest : Not Found
  @nrwl/next : Not Found
  @nrwl/node : Not Found
  @nrwl/nx-cloud : Not Found
  @nrwl/react : Not Found
  @nrwl/schematics : Not Found
  @nrwl/tao : 13.1.3
  @nrwl/web : Not Found
  @nrwl/workspace : 13.1.3
  @nrwl/storybook : 13.1.3
  @nrwl/gatsby : Not Found
  typescript : 4.3.5
barbados-clemens commented 2 years ago

hi @newmankyle, thanks for the issue report!

Can you provide a reproducible repo? I tried to reproduce it locally, but wasn't able to get any errors. So any extra info you have about this problem would be great.

Thanks!

newmankyle commented 2 years ago

Thanks for getting back to me.

I was experimenting with getting a repo setup, and I noticed my jest configuration was different. My configuration target for 'test' is @angular-builders/jest": "^10.0.1 and not @nrwl/jest. Now that I'm comparing it to another repo, it looks like that difference left some of the jest migrations incomplete.

I'm going to try and switch over to @nrwl/jest and see if that fixes it.

newmankyle commented 2 years ago

I switched over one of my libraries to @nrwl/jest and it's running fine. Looks like that was the issue.

github-actions[bot] commented 1 year ago

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.