Skip to content
This repository was archived by the owner on Apr 24, 2025. It is now read-only.

"Stage prod could not be found in your project configuration" even if it's definedย #353

@acerbisgianluca

Description

@acerbisgianluca

I'm submitting a...

  • Bug report
  • Feature request
  • Documentation issue or request
  • Other... Please describe:

Expected Behavior

In package.json I've these 3 scripts:

"get-skill-package": "jovo get:platform alexa --clean",
"get-skill-package:dev": "npm run get-skill-package -- --stage dev",
"get-skill-package:prod": "npm run get-skill-package -- --stage prod"

Here is my Jovo configuration, where I've defined 2 stages: dev and prod.

const project = new ProjectConfig({
    defaultStage: 'dev',
    plugins: [
        new AlexaCli({
            skillId: SKILL_ID,
            askProfile: 'mm',
            locales: {
                en: ['en-US'],
            },
        }),
        new GetCommand(),
        new DeployCommand(),
    ],
    stages: {
        dev: {
            endpoint: `${LAMBDA_ARN}-dev`,
        },
        prod: {
            endpoint: `${LAMBDA_ARN}-prod:prod-0`,
        },
    },
});

When I run get-skill-package:dev and get-skill-package:prod, it should pick the correct configuration.

Current Behavior

Currently when I run both command I get a warning that says WARN Stage (dev OR prod) could not be found in your project configuration. Taking default configuration....

The difference is that when I run the dev command, it actually works because it picks the default configuration which is the dev one.
But when I run the prod command, it fails with the below error message.

Error log

WARN Stage prod could not be found in your project configuration. Taking default configuration...

(node:6404) Warning: Accessing non-existent property 'stages' of module exports inside circular dependency

Your Environment

  • Jovo CLI version used: 4.1.6
  • Operating System: Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions