Hotswap CLI flag breaks first deploy
bounds opened this issue · comments
Dave Henke commented
Added in commit fd1e1da
Hotswap results in first time deployments breaking
stderr: Stack Deployments Failed: Error: No stack named 'StandaloneNextjsStack-Temporary'
Process failed with error: Error: Command failed: /Users/dave/.npm/_npx/3b877e98bdaa260f/node_modules/aws-cdk/bin/cdk deploy --app "node /Users/dave/.npm/_npx/3b877e98bdaa260f/node_modules/@sladg/nextjs-lambda/dist/cdk/app.js" --require-approval never --ci --hotswap
❌ StandaloneNextjsStack-Temporary failed: Error: No stack named 'StandaloneNextjsStack-Temporary'
at CloudFormationStack.assertExists (/Users/dave/.npm/_npx/3b877e98bdaa260f/node_modules/aws-cdk/lib/index.js:329:591559)
at CloudFormationStack.get stackId [as stackId] (/Users/dave/.npm/_npx/3b877e98bdaa260f/node_modules/aws-cdk/lib/index.js:329:590784)
at tryHotswapDeployment (/Users/dave/.npm/_npx/3b877e98bdaa260f/node_modules/aws-cdk/lib/index.js:329:598568)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async deployStack (/Users/dave/.npm/_npx/3b877e98bdaa260f/node_modules/aws-cdk/lib/index.js:335:651)
at async deployStack2 (/Users/dave/.npm/_npx/3b877e98bdaa260f/node_modules/aws-cdk/lib/index.js:342:144797)
at async /Users/dave/.npm/_npx/3b877e98bdaa260f/node_modules/aws-cdk/lib/index.js:342:130251
at async run (/Users/dave/.npm/_npx/3b877e98bdaa260f/node_modules/aws-cdk/lib/index.js:342:128257)
❌ Deployment failed: Error: Stack Deployments Failed: Error: No stack named 'StandaloneNextjsStack-Temporary'
at deployStacks (/Users/dave/.npm/_npx/3b877e98bdaa260f/node_modules/aws-cdk/lib/index.js:342:130558)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async CdkToolkit.deploy (/Users/dave/.npm/_npx/3b877e98bdaa260f/node_modules/aws-cdk/lib/index.js:342:146846)
at async exec4 (/Users/dave/.npm/_npx/3b877e98bdaa260f/node_modules/aws-cdk/lib/index.js:397:51795)
Stack Deployments Failed: Error: No stack named 'StandaloneNextjsStack-Temporary'
Dave Henke commented
Workaround is to use 6.1.2 for initial deploy
Jan commented
Closing :) Hotswap turned off by default, flag added to turn on if wanted.