Search code examples
node.jsyarnpkg

how to fix yarn.lock and package-lock json mix


So i was going on with my nodejs project and was trying to install a package with npm, but it got stuck in the process. I found I could use yarn which i, the very next second, did. It worked, but now im trying to host it on Heroku and I have both, package-lock.json and yarn.lock. If i delete any, the dependencies get outdated. how can i fix this?

My dependencies: express, passport,mongoose,ejs

I tried and searched the web for a while but nothing seemed to help me.


Solution

  • Just do yarn install and it will install all the dependencies again with updating the yarn.lock. And then you can delete package-lock.json.