Comments (6)
Make sure your CDK versions match what sst version
prints?
from sst.
This is due to aws-cdk-lib
being installed twice with two different versions. Scoped @aws-cdk/*
libs have a dependency on ^2.110.1
whereas the latest version installed is 2.114.0
. This is what is causing the conflict.
You can temporarily work around this by setting your resolutions in your package.json file as such:
"resolutions": {
"aws-cdk-lib": "2.110.1"
},
After, install again and the TS conflicts will go away.
from sst.
I managed to fix it yesterday by just uninstalling aws-cdk-lib
, constructs
and sst
then reinstalling sst
only. It all seems to work but I think when I initiated the repo with create-sst
it had aws-cdk-lib
explicitly in the package.json
file.
Is there any reason why I shouldn't proceed with only sst
as an explicit dependency?
from sst.
Is there any reason why I shouldn't proceed with only sst as an explicit dependency?
Yes, a few. It's unreliable to others on your team as you're not explicitly setting project dependencies (even if you are solo, please make this a good habit). You are also relying on peer dependencies for app/development functionality. If those peers change one day, it will break your apps.
By using the resolutions
prop, it allows you to continue to (correctly) ever-green your project dependencies until peers / other libs catch-up or fix their dependency tree. The resolution can be removed at a later date when it's fixed by the package maintainers. Also, this way, you are then explicitly declaring a dev dependency for dev work that is required within your project.
from sst.
@jayair While we're on the topic, sst current has a hard dependency on aws-cdk-lib
. It probably makes more sense to have this as a peer dependency or remove it from the docs and create-set (same goes for constructs).
@louismorgan-linaro my previous comment to you was based on the assumption that aws-cdk-lib
and constructs
were peer dependencies since they are added to the project when using create sst. I looked at the package.json after and realized they are not peers. In that case, relying on only SST is fine however that's up for the maintainers to decide for how to address this moving forward.
from sst.
Thanks very much for all the info @splicebison !
from sst.
Related Issues (20)
- How to get node-canvas layer working with live lambda HOT 1
- SST prisma example is broken HOT 1
- HTTP_PROXY support via global-agent is broken HOT 4
- Support Node 20 (Update fast-jwt, EBADENGINE for <20) HOT 1
- FeatureRequest: Provide a way to use TypeBox as scheme provider for EventBus HOT 3
- access underlying CodeBuild project, name or ARN from Job HOT 2
- XML Sitemap getServerSideProps: 404 in production HOT 2
- Permission Boundary Issues HOT 5
- Greedy Astro routes break static documents
- SolidStartSite is broken with the new version of SolidStart 0.4.0 HOT 1
- SST breaks an API Gateway V2 that is using an OpenAPI spec HOT 1
- Can SST Next.js configure CloudFront's WAF?
- NextjsSite Construct does not forward VPC configuration to the Image Optimization Function lambda HOT 1
- EdgeLambda construct environment variables HOT 4
- mTLS support in API construct HOT 5
- createEventBuilder input parameter `bus` has type `never` HOT 2
- Question: createEventBuilder validator parameter no longer optional? HOT 1
- User is not authorized to perform: lambda:GetLayerVersion HOT 3
- Streaming not compatible with logging: 'per-route' HOT 7
- Upgrade CustomerResourceHandler Nodejs to 18.x version? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sst.