Cannot create property 'outputPath' on string 'production' when trying Add Nx to Angular app by ng add @nrwl/angular command

671 Views Asked by At

When I'm running command ng add @nrwl/angular, I'm getting error "Cannot create property 'outputPath' on string 'production'"

Configuration of outputPath and production are standard for angular project.

       "outputPath": "dist/project",

       "production": {
          "outputHashing": "all",
          "fileReplacements": [
            {
              "replace": "src/environments/environment.ts",
              "with": "src/environments/environment.prod.ts"
            }
          ],
          "budgets": [
            {
              "type": "initial",
              "maximumWarning": "500kb",
              "maximumError": "2mb"
            },
            {
              "type": "anyComponentStyle",
              "maximumWarning": "2kb",
              "maximumError": "4kb"
            }
          ]
        },

Maybe anybody knows what to do make "ng add @nrwl/angular" command work without issues?

0

There are 0 best solutions below