Skip to content
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

upgrade @aws-cdk/aws-synthetics-alpha peer dependency to latest. #400

Closed
wants to merge 2 commits into from

Conversation

imaitland
Copy link

@imaitland imaitland commented Jul 28, 2023

Getting following error:

Running build command 'run-npm'
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: @aws-cdk/[email protected]
npm ERR! node_modules/@aws-cdk/aws-synthetics-alpha
npm ERR!   dev @aws-cdk/aws-synthetics-alpha@"^2.88.0-alpha.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @aws-cdk/aws-synthetics-alpha@"^2.65.0-alpha.0" from [email protected]
npm ERR! node_modules/cdk-monitoring-constructs
npm ERR!   peer cdk-monitoring-constructs@"^5.0.0" from <package>@15.0.0
npm ERR!   node_modules/<package>
npm ERR!     dev <package>@"^15.0.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @aws-cdk/[email protected]
npm ERR! node_modules/@aws-cdk/aws-synthetics-alpha
npm ERR!   peer @aws-cdk/aws-synthetics-alpha@"^2.65.0-alpha.0" from [email protected]
npm ERR!   node_modules/cdk-monitoring-constructs
npm ERR!     peer cdk-monitoring-constructs@"^5.0.0" from <package>@15.0.0
npm ERR!     node_modules/<package>
npm ERR!       dev <package>@"^15.0.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! /Users/iainland/.npm/_logs/2023-07-28T20_29_24_009Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/iainland/.npm/_logs/2023-07-28T20_29_24_009Z-debug-0.log
'npm install' exited 1

I don't want to downgrade to 2.65, as it does not support newer puppeteer runtimes.

e.g. with 2.65 i cannot use: synthetics.Runtime.SYNTHETICS_NODEJS_PUPPETEER_4_0

@echeung-amzn
Copy link
Member

There's no reason to bump up the dependencies unless we need something from a newer version. The alpha modules' versioning is awkward such that semver ranges don't quite work the way you expect.

If you want to use a newer version that you have a concrete dependency on, use overrides in your package.json file:

"dependencies": {
  "@aws-cdk/aws-synthetics-alpha": "2.88.0-alpha.0",
  "cdk-monitoring-constructs": "5.3.5",
  ...
},
"overrides": {
  "cdk-monitoring-constructs": {
    "@aws-cdk/aws-synthetics-alpha": "$@aws-cdk/aws-synthetics-alpha"
  }
}

@imaitland
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants