Skip to content

Issue SST v2.49.0 - @aws-cdk/toolkit-lib #82

@michael-harley

Description

@michael-harley

My CI/CD on GithubAction is failing after I upgrade the SST from 2.48.5 to 2.49.0.
CI/CD command: sst deploy
I'm using:

  • node 22
  • pnpm 10

package.json

{
  "name": "repo",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "check-circular-deps": "dpdm --no-warning --no-tree",
    "lint": "eslint",
    "deploy": "sst deploy",
    "cleanup": "sst remove",
    "submodule-init": "git submodule update --init --recursive",
    "submodule-update": "git submodule update --remote --merge",
    "test": "jest --coverage --collectCoverageFrom='src/**/*.{js,jsx,ts,tsx}' --no-cache --silent --forceExit",
    "test-ui": "jest --coverage --collectCoverageFrom='src/**/!(utils|_utils)/*.{js,jsx,ts,tsx}'  --forceExit",
    "test-util": "jest --coverage --collectCoverageFrom='src/**/(utils|_utils)/*.{js,jsx,ts,tsx}'  --forceExit",
    "gen:mock": "msw init",
    "check:ts": "npx tsc"
  },
  "dependencies": {
    "@aws-amplify/auth": "^6.11.0",
    "@aws-amplify/core": "^6.10.0",
    "@aws-sdk/client-s3": "^3.826.0",
    "@datadog/browser-rum": "^5.15.0",
    "@datadog/browser-rum-core": "^5.15.0",
    "@hookform/resolvers": "^3.3.0",
    "@opennextjs/aws": "3.6.5",
    "@storybook/addon-viewport": "^8.6.10",
    "@storybook/react": "^8.6.10",
    "@storybook/react-webpack5": "^8.6.10",
    "@storybook/test": "^8.6.10",
    "@storybook/types": "^8.6.12",
    "@tanstack/react-query": "4.28.0",
    "amazon-cognito-identity-js": "^6.3.7",
    "aws-amplify": "^6.13.0",
    "aws-cdk-lib": "2.201.0",
    "axios": "^1.10.0",
    "bowser": "^2.11.0",
    "datadog-metrics": "^0.12.1",
    "date-fns": "^3.3.0",
    "es-cookie": "^1.4.0",
    "hoist-non-react-statics": "^3.3.2",
    "html-entities": "^2.4.0",
    "htmr": "^1.0.2",
    "intl-messageformat": "^10.5.10",
    "lodash": "^4.17.21",
    "next": "15.3.2",
    "qs": "^6.12.3",
    "rc-slider": "^11.1.5",
    "react": "^18.3.1",
    "react-dom": "^18.3.1",
    "react-fast-marquee": "^1.6.4",
    "react-highlight-words": "^0.20.0",
    "react-hook-form": "^7.49.3",
    "react-intersection-observer": "^9.10.3",
    "react-native-svg": "^15.11.2",
    "react-native-svg-web": "^1.0.9",
    "react-native-web": "^0.20.0",
    "react-native-web-linear-gradient": "^1.1.2",
    "react-no-ssr": "^1.1.0",
    "react-number-format": "^5.3.1",
    "react-spring": "8.0.27",
    "react-youtube": "^10.1.0",
    "recharts": "^2.12.1",
    "sst": "^2.49.0",
    "uuid": "^9.0.1",
    "zod": "^3.21.4"
  },
  "devDependencies": {
    "@babel/preset-flow": "^7.25.9",
    "@babel/preset-typescript": "^7.27.0",
    "@datadog/datadog-ci": "*",
    "@eslint/compat": "^1.1.1",
    "@eslint/js": "^9.7.0",
    "@testing-library/jest-dom": "^6.4.5",
    "@testing-library/react": "^16.3.0",
    "@types/hoist-non-react-statics": "^3.3.5",
    "@types/jest": "^29.5.12",
    "@types/lodash": "^4.14.202",
    "@types/node": "20.4.5",
    "@types/qs": "6.5.3",
    "@types/react": "^18.3.21",
    "@types/react-dom": "^18.3.7",
    "@types/react-highlight-words": "^0.16.7",
    "@types/react-native": "0.72.8",
    "@types/react-no-ssr": "^1.1.7",
    "@types/react-router-dom": "^5.3.3",
    "@types/use-subscription": "^1.0.0",
    "@types/uuid": "^9.0.8",
    "babel-jest": "^29.7.0",
    "babel-plugin-react-native-web": "^0.19.13",
    "deprecated-react-native-prop-types": "2.2.0",
    "dpdm": "^3.14.0",
    "eslint": "^9.29.0",
    "eslint-config-prettier": "^9.1.0",
    "eslint-plugin-react-hooks": "^4.6.2",
    "jest": "^29.7.0",
    "jest-css-modules-transform": "^4.4.2",
    "jest-environment-jsdom": "^29.7.0",
    "jest-fixed-jsdom": "^0.0.9",
    "msw": "^2.10.2",
    "ts-jest": "^29.4.0",
    "typescript": "5.3.3",
    "typescript-eslint": "^7.16.1"
  },
  "msw": {
    "workerDirectory": [
      "public"
    ]
  },
  "pnpm": {
    "patchedDependencies": {
      "@react-native/assets-registry": "patches/@react-native__assets-registry.patch"
    },
    "overrides": {
      "@babel/helpers": "^7.26.10",
      "@babel/runtime": "^7.26.10",
      "brace-expansion@1": "^1.1.12",
      "brace-expansion@2": "^2.0.2",
      "esbuild": "0.25.5",
      "fast-xml-parser": "4.4.1"
    }
  }
}

Error trace:

Error: Cannot read properties of undefined (reading 'defaults')

Trace: TypeError: Cannot read properties of undefined (reading 'defaults')
    at provideContextValues (/home/runner/work/repo/repo/node_modules/.pnpm/@aws-cdk+toolkit-lib@1.1.1_@aws-cdk+cli-plugin-contract@2.181.0_@aws-sdk+client-sso-oid_99fc94117ebdcadfc2e0513878c8ca26/node_modules/@aws-cdk/toolkit-lib/lib/context-providers/index.ts:123:20)
    at synthInRoot (file:///home/runner/work/repo/repo/node_modules/.pnpm/sst@2.49.0_@aws-cdk+cli-plugin-contract@2.181.0_@aws-sdk+client-sso-oidc@3.621.0_@aws-s_de3868a586745ffa2e895cbac9554448/node_modules/sst/stacks/synth.js:70:23)
    at async Module.synth (file:///home/runner/work/repo/repo/node_modules/.pnpm/sst@2.49.0_@aws-cdk+cli-plugin-contract@2.181.0_@aws-sdk+client-sso-oidc@3.621.0_@aws-s_de3868a586745ffa2e895cbac9554448/node_modules/sst/stacks/synth.js:21:16)
    at async file:///home/runner/work/repo/repo/node_modules/.pnpm/sst@2.49.0_@aws-cdk+cli-plugin-contract@2.181.0_@aws-sdk+client-sso-oidc@3.621.0_@aws-s_de3868a586745ffa2e895cbac9554448/node_modules/sst/cli/commands/deploy.js:80:28
    at async Object.handler (file:///home/runner/work/repo/repo/node_modules/.pnpm/sst@2.49.0_@aws-cdk+cli-plugin-contract@2.181.0_@aws-sdk+client-sso-oidc@3.621.0_@aws-s_de3868a586745ffa2e895cbac9554448/node_modules/sst/cli/commands/deploy.js:71:26)
    at process.<anonymous> (file:///home/runner/work/repo/repo/node_modules/.pnpm/sst@2.49.0_@aws-cdk+cli-plugin-contract@2.181.0_@aws-sdk+client-sso-oidc@3.621.0_@aws-s_de3868a586745ffa2e895cbac9554448/node_modules/sst/cli/sst.js:58:21)
    at process.emit (node:events:524:28)
    at process._fatalException (node:internal/process/execution:188:25)
    at throwUnhandledRejectionsMode (node:internal/process/promises:391:5)
    at processPromiseRejections (node:internal/process/promises:470:17)
    at process.processTicksAndRejections (node:internal/process/task_queues:96:32)
 ELIFECYCLE  Command failed with exit code 1.
Error: Process completed with exit code 1.

Raised on discord: https://discord.com/channels/983865673656705025/1384752891402911805

Metadata

Metadata

Assignees

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