Should multiple node modules be necessary while importing

I have exported few components from my project A and then imported to project B, now in project B the node module dependencies of component X are getting installed again. I thought it would be part of project B’s main node modules.