worldsibu / convector-cli

Official Command-Line Interface for Convector Framework
https://github.com/worldsibu/convector-cli
Other
29 stars 7 forks source link

Local dependencies not found #39

Closed AmaVic closed 5 years ago

AmaVic commented 5 years ago

Hi there! I have a convector project in which I have 2 chaincodes: customer and order. I can deploy these two chaincodes without any problem.

However, if I add one as a dependency for the other, I can't deploy the depending one.

So, the following scenario works without any issues:

conv new test -c order cd test npm install hurl clean npm run env:restart conv generate chaincode customer npm run cc:start -- customer npm run cc:start -- order

However, if I do the following:

conv new test -c order cd test npm install hurl clean npm run env:restart conv generate chaincode customer

npx lerna add customer-cc --scope order-cc

npm run cc:start -- customer npm run cc:start -- order

I get the following error:

Capture d’écran 2019-07-08 à 16 13 30

Is it a problem linked with my setup, or is there an issue with convector?

Thanks already! Have a nice day!

walmon commented 5 years ago

Hi @AmaVic thanks for reaching out.

Did you bundle them in your config file? If not, this reference will clear the process for you: https://docs.worldsibu.com/article/84-controllers#bundling

Basically, to use them as dependencies the source code needs to be included in the released package chaincode-*, that bundling process makes sure to copy them, therefore, be accessible for your references.

By the way, once you add one to the other as a dependency you don't need to install them both. You just need the one invoking the others.

Let me know if that helps you!

AmaVic commented 5 years ago

Good morning @walmon !

It's a point that I indeed missed, and everything's fixed now! Thanks a lot for the quick and effective answer!

Also, thanks for the efforts around Convector and Hurley!

Have a nice day!

walmon commented 5 years ago

Glad to hear! @AmaVic

I hope you join the Discord community in case you haven't yet: https://discord.gg/twRwpWt

AmaVic commented 5 years ago

Will do ! :)