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

Angular 16 ESBuild build fails #16790

Closed
1 of 4 tasks
pavankjadda opened this issue May 5, 2023 · 1 comment · Fixed by #16797
Closed
1 of 4 tasks

Angular 16 ESBuild build fails #16790

pavankjadda opened this issue May 5, 2023 · 1 comment · Fixed by #16797
Assignees
Labels
outdated scope: angular Issues related to Angular support in Nx type: bug

Comments

@pavankjadda
Copy link

Current Behavior

New or existing angular project with esbuild (@angular-devkit/build-angular:browser-esbuild) fails with below error " Property 'index' does not match the schema."

>  NX   Property 'index' does not match the schema.

   {
     "description": "Configures the generation of the application's HTML index.",
     "oneOf": [
       {
         "type": "string",
         "description": "The path of a file to use for the application's HTML index. The filename of the specified path will be used for the generated file and will be created in the root of the application's configured output path."
       },
       {
         "type": "object",
         "description": "",
         "properties": {
           "input": {
             "type": "string",
             "minLength": 1,
             "description": "The path of a file to use for the application's generated HTML index."
           },
           "output": {
             "type": "string",
             "minLength": 1,
             "default": "index.html",
             "description": "The output path of the application's generated HTML index file. The full provided path will be used and will be considered relative to the application's configured output path."
           }
         },
         "required": [
           "input"
         ]
       },
       {
         "const": "false",
         "description": "Does not generate an `index.html` file."
       }
     ]
   }'


 ——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

 >  NX   Ran target build for project nx-esbuild-bug (280ms)
 
    ✖    1/1 failed
    ✔    0/1 succeeded [0 read from cache]
 
 ELIFECYCLE  Command failed with exit code 1.

Expected Behavior

The build should work as expected and build the project

GitHub Repo

https://github.com/pavankjadda/nx-esbuild-bug

Steps to Reproduce

  1. pnpm create nx-workspace
  2. Generate angular project
  3. Go to project and change "executor": "@angular-devkit/build-angular:browser" to "executor": "@angular-devkit/build-angular:browser-esbuild" in project.json of the angular project
  4. pnpm build (create build script). Refer github link for details

Nx Report

>  NX   Report complete - copy this into the issue template

   Node   : 18.16.0
   OS     : darwin arm64
   pnpm   : 8.4.0
   Hasher : Native
   
   nx (global)        : 16.1.0
   nx                 : 16.1.0
   @nx/js             : 16.1.0
   @nx/jest           : 16.1.0
   @nx/linter         : 16.1.0
   @nx/workspace      : 16.1.0
   @nx/angular        : 16.1.0
   @nx/cypress        : 16.1.0
   @nx/eslint-plugin  : 16.1.0
   @nx/web            : 16.1.0
   typescript         : 5.0.2

Failure Logs

> nx run nx-esbuild-bug:build:production


 >  NX   Property 'index' does not match the schema.

   {
     "description": "Configures the generation of the application's HTML index.",
     "oneOf": [
       {
         "type": "string",
         "description": "The path of a file to use for the application's HTML index. The filename of the specified path will be used for the generated file and will be created in the root of the application's configured output path."
       },
       {
         "type": "object",
         "description": "",
         "properties": {
           "input": {
             "type": "string",
             "minLength": 1,
             "description": "The path of a file to use for the application's generated HTML index."
           },
           "output": {
             "type": "string",
             "minLength": 1,
             "default": "index.html",
             "description": "The output path of the application's generated HTML index file. The full provided path will be used and will be considered relative to the application's configured output path."
           }
         },
         "required": [
           "input"
         ]
       },
       {
         "const": "false",
         "description": "Does not generate an `index.html` file."
       }
     ]
   }'


 ——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

 >  NX   Ran target build for project nx-esbuild-bug (379ms)
 
    ✖    1/1 failed
    ✔    0/1 succeeded [0 read from cache]
 
 ELIFECYCLE  Command failed with exit code 1.

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

@github-actions
Copy link

github-actions bot commented Jun 5, 2023

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated scope: angular Issues related to Angular support in Nx type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants