strapi icon indicating copy to clipboard operation
strapi copied to clipboard

discussion: the necessity of using exact dependency versions

Open atassis opened this issue 8 months ago • 0 comments

Node Version

any

NPM/Yarn/PNPM Version

any

Strapi Version

5.7.0

Operating System

Linux (RedHat/CentOS)

Database

SQLite

Javascript or Typescript

Typescript

Reproduction URL

No response

Bug Description

Hi there. I have started using strapi a while ago. I have already met several unclear things in it, though it does an intended job well. Speaking about the mentioned issue- I have found that strapi uses exact dependency versions, which makes more things complicated (duplication of packages in node_modules when using npm, bigger Docker images, etc). Wanted to know what is an exact point of using exact package versioning? Worth noting, typescript itselves uses inexact versions of deps. In my case, I wanted to use a latest typescript version and have found out that every strapi package duplicates a typescript package in node_modules, 8 times total. For a pretty simple generated API via strapi, a docker image is taking around 1Gb in size, which slows the deployment time and etc etc.

Steps to Reproduce

Install strapi and have a look at package.json

Expected Behavior

Usage of inexact dependencies in package.json

Logs

shell
strapi-project git:(main) ✗ cat package-lock.json | grep 'node_modules/typescript"' | wc -l
8

Code Snippets

No response

Media

No response

Additional information

No response

Confirmation Checklist

  • [x] I have checked the existing issues for duplicates.
  • [x] I agree to follow this project's Code of Conduct.

atassis avatar Jun 09 '25 18:06 atassis