stack icon indicating copy to clipboard operation
stack copied to clipboard

schema definitions require `$id` instead of `id` property

Open nunico opened this issue 2 years ago • 4 comments

init generator fails because the id property of the schema isn't recognised and therefore validation of given schema fails.

Expected Behavior

Generator generates valid app

Current Behavior

Command errors with output:

✔ Which type of library would you like to use? · tailwind
Error: NOT SUPPORTED: keyword "id", use "$id" for schema ID
    at Object.code (/Users/XXX/Code/spikes/nx/nxpm/node_modules/@angular-devkit/core/node_modules/ajv/dist/vocabularies/core/id.js:6:15)
    at keywordCode (/Users/XXX/Code/spikes/nx/nxpm/node_modules/@angular-devkit/core/node_modules/ajv/dist/compile/validate/index.js:454:13)
    at /Users/XXX/Code/spikes/nx/nxpm/node_modules/@angular-devkit/core/node_modules/ajv/dist/compile/validate/index.js:222:17
    at CodeGen.code (/Users/XXX/Code/spikes/nx/nxpm/node_modules/@angular-devkit/core/node_modules/ajv/dist/compile/codegen/index.js:439:13)
    at CodeGen.block (/Users/XXX/Code/spikes/nx/nxpm/node_modules/@angular-devkit/core/node_modules/ajv/dist/compile/codegen/index.js:568:18)
    at iterateKeywords (/Users/XXX/Code/spikes/nx/nxpm/node_modules/@angular-devkit/core/node_modules/ajv/dist/compile/validate/index.js:219:9)
    at groupKeywords (/Users/XXX/Code/spikes/nx/nxpm/node_modules/@angular-devkit/core/node_modules/ajv/dist/compile/validate/index.js:208:13)
    at /Users/XXX/Code/spikes/nx/nxpm/node_modules/@angular-devkit/core/node_modules/ajv/dist/compile/validate/index.js:192:13
    at CodeGen.code (/Users/XXX/Code/spikes/nx/nxpm/node_modules/@angular-devkit/core/node_modules/ajv/dist/compile/codegen/index.js:439:13)
    at CodeGen.block (/Users/XXX/Code/spikes/nx/nxpm/node_modules/@angular-devkit/core/node_modules/ajv/dist/compile/codegen/index.js:568:18)
NOT SUPPORTED: keyword "id", use "$id" for schema ID
error Command failed with exit code 1.

Possible Solution

Steps to Reproduce (for bugs)

  1. yarn create nx-workspace sandbox --preset=empty --cli=angular
  2. cd sandbox
  3. yarn add -D @nxpm/stack @nrwl/angular @nrwl/nest
  4. yarn nx g @nxpm/stack:init web
  5. Choose Tailwind

Context

Wanted to setup a fresh sandbox environment without installing @nxpm/cli or nx globally.

Your Environment

  • Version used:
Angular CLI: 13.0.4
Node: 14.18.1
Package Manager: yarn 1.22.17
OS: darwin x64
Angular: undefined
...
Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.1300.4
@angular-devkit/core         13.0.4
@angular-devkit/schematics   11.2.15
@angular/cli                 13.0.4
@schematics/angular          13.0.4
typescript                   4.4.4
  yarn: '1.22.17',
  nxpm: '0.0.0',
  node: '14.18.1',
  v8: '8.4.371.23-node.84',
  uv: '1.42.0',
  zlib: '1.2.11',
  brotli: '1.0.9',
  ares: '1.17.2',
  modules: '83',
  nghttp2: '1.42.0',
  napi: '8',
  llhttp: '2.1.4',
  openssl: '1.1.1l',
  cldr: '39.0',
  icu: '69.1',
  tz: '2021a',
  unicode: '13.0'
  • Browser Name and version:
  • Operating System and version (desktop or mobile): OS: darwin x64
  • Link to your project:

nunico avatar Dec 13 '21 11:12 nunico

Have the same problem.

andreElrico avatar Feb 05 '22 19:02 andreElrico

same

tonipepperoni avatar Feb 09 '22 18:02 tonipepperoni

@tonipepperoni @andreElrico @nunico can you try the next release as described here?

https://github.com/nxpm/stack/issues/143#issuecomment-948073282

beeman avatar Feb 09 '22 20:02 beeman

Ill try to test it this week!

andreElrico avatar Feb 10 '22 15:02 andreElrico