nxpm / stack

🥭 nxpm-stack lets you generate a complete and opinionated full-stack application in a Nx Workspace, ready to extend and deploy!

Home Page:https://npm.im/@nxpm/stack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

nunico opened this issue · 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:

Have the same problem.

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

#143 (comment)

Ill try to test it this week!