Skip to content

Configuration 'development' is not set in the workspace. #18428

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

Closed
Danubius1st opened this issue Aug 3, 2020 · 3 comments
Closed

Configuration 'development' is not set in the workspace. #18428

Danubius1st opened this issue Aug 3, 2020 · 3 comments

Comments

@Danubius1st
Copy link

🐞 bug report

Is this a regression?

Yes, the previous version in which this bug was not present was: 9.1.11

Description

angular.json fragment:
...
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
]
}
},
"development": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.dev.ts"
}
],
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "40kb"
}
]
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "multiple-env2:build"
},
"configurations": {
"production": {
"browserTarget": "multiple-env2:build:production"
},
"development": {
"browserTarget": "multiple-env2:build:development"
}
}
},
...

🔬 Minimal Reproduction

ng serve -c=development

🔥 Exception or Error




An unhandled exception occurred: Configuration 'development' is not set in the workspace.

🌍 Your Environment

Angular Version:




Angular CLI: 10.0.5
Node: 14.7.0
OS: win32 x64

Angular: 10.0.7
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.1000.5
@angular-devkit/build-angular     0.1000.5
@angular-devkit/build-optimizer   0.1000.5
@angular-devkit/build-webpack     0.1000.5
@angular-devkit/core              10.0.5
@angular-devkit/schematics        10.0.5
@angular/cli                      10.0.5
@ngtools/webpack                  10.0.5
@schematics/angular               10.0.5
@schematics/update                0.1000.5
rxjs                              6.5.5
typescript                        3.9.7
webpack                           4.43.0

@JoostK JoostK transferred this issue from angular/angular Aug 3, 2020
@alan-agius4
Copy link
Collaborator

Hi @Danubius1st, your JSON is not structured correctly. development should be a direct child of config configurations in both entries.

@Danubius1st
Copy link
Author

Maybe I should use indentation

      "configurations": {
        "production": {
          "fileReplacements": [
            {
              "replace": "src/environments/environment.ts",
              "with": "src/environments/environment.prod.ts"
            }
          ],
          "optimization": true,
          "outputHashing": "all",
          "sourceMap": false,
          "extractCss": true,
          "namedChunks": false,
          "extractLicenses": true,
          "vendorChunk": false,
          "buildOptimizer": true,
          "budgets": [
            {
              "type": "initial",
              "maximumWarning": "500kb",
              "maximumError": "1mb"
            },
            {
              "type": "anyComponentStyle",
              "maximumWarning": "2kb",
              "maximumError": "4kb"
            }
          ]
        }
      },
      "development": {
        "fileReplacements": [
          {
            "replace": "src/environments/environment.ts",
            "with": "src/environments/environment.dev.ts"
          }
        ],
        "budgets": [
          {
            "type": "anyComponentStyle",
            "maximumWarning": "40kb"
          }
        ]
      }
    },
    "serve": {
      "builder": "@angular-devkit/build-angular:dev-server",
      "options": {
        "browserTarget": "multiple-env2:build"
      },
      "configurations": {
        "production": {
          "browserTarget": "multiple-env2:build:production"
        },
        "development": {
          "browserTarget": "multiple-env2:build:development"
        }
      }
    },

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants