DEV Community

Discussion on: What are those PeerDependencies in a NodeJS project?

Collapse
 
norayr93 profile image
Norayr Ghukasyan • Edited

I specially signed in to write a comment for this article. Really thank you, man. It's already 2 months I can't really understand and even find a good article related to peerDependencies. One small thing I couldn't understand from StackOverflow answer and from this article is it.

From StackOverflow -
How peer dependencies solve this.
They tell npm
I need this package, but I need the version that is part of the project,
not some version private to my module.

From this article -
"Hey, this is JacksModule speaking here. Let me tell you: I need this
specific package of JillsModule, but I really need the version that is
part of my JacksModule project and listed in my package.json file. So
please make sure it's installed and make sure it's not some other version
of JillsModule you might have installed for your own usage somewhere else
in your application."

Note the difference. You say that I need this
specific package of JillsModule, but I really need the version that is
part of my JacksModule project and listed in my package.json file.
and StackOverflow says I need this package, but I need the version that is part of the project,
not some version private to my module.

Could you please explain it ?