mmornati / ghost-cloudinary-store

A Cloudinary image storage module for Ghost blogs.
20 stars 5 forks source link

Build failed: Two different lockfiles found: package-lock.json and yarn.lock #23

Closed SNathJr closed 5 years ago

SNathJr commented 6 years ago

I have been trying to add the storage module before pushing to heroku and did as mentioned in readme of this repo. While attempting git push heroku master I got an error from heroku saying:

Counting objects: 1305, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (1257/1257), done.
Writing objects: 100% (1305/1305), 8.90 MiB | 602.00 KiB/s, done.
Total 1305 (delta 133), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Node.js app detected
remote: 
remote: -----> Build failed
remote:  !     Two different lockfiles found: package-lock.json and yarn.lock
remote: 
remote:        Both npm and yarn have created lockfiles for this application,
remote:        but only one can be used to install dependencies. Installing
remote:        dependencies using the wrong package manager can result in missing
remote:        packages or subtle bugs in production.
remote: 
remote:        - To use npm to install your application's dependencies please delete
remote:          the yarn.lock file.
remote: 
remote:          $ git rm yarn.lock
remote: 
remote:        - To use yarn to install your application's dependences please delete
remote:          the package-lock.json file.
remote: 
remote:          $ git rm package-lock.json
remote:     
remote:        https://kb.heroku.com/why-is-my-node-js-build-failing-because-of-conflicting-lock-files
remote: 
remote:  !     Push rejected, failed to compile Node.js app.
remote: 
remote:  !     Push failed
remote: Verifying deploy...
remote: 
remote: !       Push rejected toherokuapp.
remote: 
To https://git.heroku.comherokuapp.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/herokuapp.git'

I did visit the mentioned url and got a suggestion to remove one of the lock files. Now I know I can not delete yarn.lock otherwise my ghost blog wont deploy, and if I delete package-lock.json ghost will build without the cloudinary storage adapter.

Any suggestions how to fix this?

SNathJr commented 6 years ago

I finally managed to configure cloudinary properly. I forked @cobyism's ghost-on-heroku repository and have created a one click deploy to heroku button with cloudinary support. It can be found at https://github.com/SNathJr/ghost-on-heroku

@SNathJr