Yes you can definitely do this- you'll find that the node_modules folder is the largest piece of this. Just to be safe if the packages are similar, you can copy it and then do an npm install in the folder and you should fetch any packages that changed or you didn't have for whatever reason.
Wouldn't it affect the perfomace of the new app?
No it shouldn’t matter. Yarn is a competitor to npm and it will actually cache your packages which is essentially the same idea you are doing here. With that said, just because you can do this, if it gives you problems just do an npm install to make sure you package versions are all good.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.