Vugar Abdullayev
Vugar Abdullayev

Reputation: 2085

Angular ng build does not produce dist folder

I am so frustrated in that I ran ng build but it does not produce dist folder in the project folder. I have no problem with other projects. Strange is that compiler does not give any errors. Could someone please check my project and tell the reason? https://github.com/vugar005/Report Kind Regards

Upvotes: 4

Views: 9773

Answers (2)

Jan M
Jan M

Reputation: 58

This does not apply to this specific case, but it might help others experiencing the same problem.

In angular.json:

projects.<project name>.architect.build.configurations.<configuration>.tsconfig

was set to a file that did not exist. Changing this to the correct file fixed the issue in my case.

{
  /* other configuration */
  "projects": {
    /* other configuration */
    "my-library": {
      /* other configuration */
      "architect": {
        "build": {
          "builder": "@angular-devkit/build-angular:ng-packagr",
          "options": {
            "project": "projects/my-library/ng-package.json"
          },
          "configurations": {
            "production": {
              /* this used to be a file that did not exist */
              "tsConfig": "projects/my-library/tsconfig.json"
            },
            "development": {
              /* this used to be a file that did not exist */
              "tsConfig": "projects/my-library/tsconfig.json"
            }
          }
        }
      }
    }
  }
}

Upvotes: 2

mczal
mczal

Reputation: 166

I have seen your repository, and i think the problem is on your ".angular-cli.json" file. On line 9 you specify outDir to "../MHS" and it should produce the result into "../MHS" folder instead of "dist" folder.

As a resolution to your problem, you could change the outDir from "../MHS" to "dist".

Upvotes: 14

Related Questions