amplify-education / serverless-domain-manager

Serverless plugin for managing custom domains with API Gateways.
MIT License
936 stars 235 forks source link

Serverless v4 compatibility #638

Open ashley-jisc opened 1 month ago

ashley-jisc commented 1 month ago

Community Note

Bug Report

Error Description When attempting to install this plugin with Serverless V4 (4.1.21) I get the following error

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving:[REDACTED]@1.0.0
npm ERR! Found: serverless@4.1.21
npm ERR! node_modules/serverless
npm ERR!   dev serverless@"4.1.21" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer serverless@"^2.60 || ^3.0.0" from serverless-domain-manager@7.3.8
npm ERR! node_modules/serverless-domain-manager
npm ERR!   dev serverless-domain-manager@"*" 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/work/.npm/_logs/2024-08-13T12_56_27_785Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: /Users/work/.npm/_logs/2024-08-13T12_56_27_785Z-debug-0.log

Command Run npm install serverless-domain-manager --save-dev

Domain Manager Configuration Replace this with your own serverless.yml file (anonymized, of course) to help us better resolve your issue. N/A

Versions

Possible Solution Update dependencies

Additional context/Screenshots Add any other context about the problem here. If applicable, add screenshots to help explain.

iNick commented 4 weeks ago

It looks like the peerDependencies section in packages.json at npm is still:

"peerDependencies": {
    "serverless": "^2.60 || ^3.0.0"
  }

This should be fixed by this commit: https://github.com/amplify-education/serverless-domain-manager/commit/8dbb433f5d0174069546ad6de70e85325fff54a1 Hopefully this will be released with 7.4.0: https://github.com/amplify-education/serverless-domain-manager/pull/635

franrivero commented 2 weeks ago

We have the same issue when we try to use sls version 4 with domain manager, do you have any fix of this?

rddimon commented 2 weeks ago

Hi there It should be fixed in the 7.4.0

Let us know in case any issues