Are you sure what packages you're using are in package.json?
Projects that I'm working on are managed separately, even they are similar and have common packages.
One day, I changed a package manager of a project for a testing purpose, then I've found the code that imported an undefined package
Phantom dependencies are packages that are not defined in package.json.
Let's see the example,
there is one dependency
express but the project can use an undefined package
qs, and there is
That means your code can refer packages that you don't know what it is and what version is. It happens when you install packages using
Yarn Berry's approach solves this problem though, I didn't much about it so, I'm going to show you an example using
pnpm: Fast, disk space efficient package manager
There are only packages that were defined in
If you wanna know more about
pnpm, visit pnpm.