Azure / ng-deploy-azure

Deploy Angular apps to Azure using the Angular CLI
MIT License
79 stars 37 forks source link

No longer works for Angular 13 #102

Closed franktroia closed 2 years ago

franktroia commented 2 years ago

Describe the bug After upgrading to Angular 13, ng deploy no longer works. I get the following error An unhandled exception occurred: NOT SUPPORTED: keyword "id", use "$id" for schema ID"

To Reproduce Steps to reproduce the behavior:

  1. Generate a new angular using version 13
  2. Add @azure/ng-deploy
  3. Configure
  4. Run ng deploy

Expected behavior Deploy should be successful

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

shmool commented 2 years ago

Thanks @franktroia, we'll investigate! I understand that the error happens during the deployment attempt. Is there any other relevant output that you can share?

stuartst commented 2 years ago

@shmool @franktroia

It appears that something in Angular v13 now uses AJV v7 (with JSON Schema Draft 4) that now requires that any JSON schema files use the id property prefixed with a dollar sign ($). This package is still using the legacy "id" without a dollar sign.

I was able to workaround this issue by changing the "id" property to "$id" in the schema files.

https://github.com/agilitylabsio/ng-deploy-azure/commit/e9bb4ef8de16e413065b9e6937970953def23af3

remybd commented 2 years ago

Hello Do you plan to update the package to be compatible with angular v13 ? Thanks

shmool commented 2 years ago

Working on it... Some additional project maintenance is required here... Thanks for waiting :)

paweleck commented 2 years ago

Working on it... Some additional project maintenance is required here... Thanks for waiting :)

@shmool Any workaround for now?

doggy8088 commented 2 years ago

@alan-agius4 I have the same issue. Here is the angular-error.log content.

[error] Error: NOT SUPPORTED: keyword "id", use "$id" for schema ID
    at Object.code (G:\Projects\demo1\node_modules\ajv\dist\vocabularies\core\id.js:6:15)
    at keywordCode (G:\Projects\demo1\node_modules\ajv\dist\compile\validate\index.js:454:13)
    at G:\Projects\demo1\node_modules\ajv\dist\compile\validate\index.js:222:17
    at CodeGen.code (G:\Projects\demo1\node_modules\ajv\dist\compile\codegen\index.js:439:13)
    at CodeGen.block (G:\Projects\demo1\node_modules\ajv\dist\compile\codegen\index.js:568:18)
    at iterateKeywords (G:\Projects\demo1\node_modules\ajv\dist\compile\validate\index.js:219:9)
    at groupKeywords (G:\Projects\demo1\node_modules\ajv\dist\compile\validate\index.js:208:13)
    at G:\Projects\demo1\node_modules\ajv\dist\compile\validate\index.js:192:13
    at CodeGen.code (G:\Projects\demo1\node_modules\ajv\dist\compile\codegen\index.js:439:13)
    at CodeGen.block (G:\Projects\demo1\node_modules\ajv\dist\compile\codegen\index.js:568:18)
doggy8088 commented 2 years ago

@manekinekko I think this issue have to re-open. The @angular-devkit/* is outdated and it's not compatible with latest Angular CLI Builders. My PR doesn't solve this issue.