root-systems / cobuy

:seedling: :package: :stew: :family: Helping people buy good food at good prices, together.
GNU Affero General Public License v3.0
25 stars 4 forks source link

Error running npm run dev (on fresh install) #182

Closed gmarcos87 closed 6 years ago

gmarcos87 commented 7 years ago

Hello everyone. I'm trying to install and run Cobuy. I followed the steps of the readme and I get the following error:

cobuy git:(master) ✗ npm run dev

> cobuy@2.0.0 dev /home/okupa/root-system/cobuy
> npm-run-all -p dev:*

> cobuy@2.0.0 dev:mail /home/okupa/root-system/cobuy
> maildev

> cobuy@2.0.0 dev:server /home/okupa/root-system/cobuy
> dog dev server

MailDev webapp running at http://0.0.0.0:1080
MailDev SMTP Server running at 0.0.0.0:1025
Error: You must provide a 'secret' in your authentication configuration
    at Function.authentication (/home/okupa/root-system/cobuy/node_modules/feathers-authentication/lib/index.js:58:13)
    at Function.configure (/home/okupa/root-system/cobuy/node_modules/feathers/lib/application.js:150:8)
    at Function.module.exports (/home/okupa/root-system/cobuy/node_modules/dogstack-agents/authentication/service.js:22:6)
    at Function.configure (/home/okupa/root-system/cobuy/node_modules/feathers/lib/application.js:150:8)
    at services.forEach.service (/home/okupa/root-system/cobuy/node_modules/dogstack-agents/service.js:23:9)
    at Array.forEach (native)
    at Function.module.exports (/home/okupa/root-system/cobuy/node_modules/dogstack-agents/service.js:22:12)
    at Function.configure (/home/okupa/root-system/cobuy/node_modules/feathers/lib/application.js:150:8)
    at services.forEach.service (/home/okupa/root-system/cobuy/node_modules/dogstack/createServer.js:62:9)
    at Array.forEach (native)
    at createServer (/home/okupa/root-system/cobuy/node_modules/dogstack/createServer.js:61:12)
    at Object.handler (/home/okupa/root-system/cobuy/node_modules/dogstack/commands/server.js:31:20)
    at Object.self.runCommand (/home/okupa/root-system/cobuy/node_modules/yargs/lib/command.js:231:22)
    at Object.Yargs.self._parseArgs (/home/okupa/root-system/cobuy/node_modules/yargs/yargs.js:990:30)
    at Object.get [as argv] (/home/okupa/root-system/cobuy/node_modules/yargs/yargs.js:930:19)
    at Object.<anonymous> (/home/okupa/root-system/cobuy/node_modules/dogstack/cli.js:27:3)
[ERROR] 13:54:28 Error

My idea is to see how it works and if it can be adapted to a local food production cooperative. Thank you!

danalexilewis commented 7 years ago

@gmarcos87 so great your interested in our software! I'll leave it to others to help you get up and running. I wear the product owner hat and I'd be really interested in exploring your software needs for a production coop.

We have always planned to build "cosupply" in the future, but strategically have chosen to start with buying.

Do you have any documented needs analysis/pain points you can share?

ahdinosaur commented 7 years ago

hey @gmarcos87, nice to see you here!

the error "Error: You must provide a 'secret' in your authentication configuration" is caused by not providing secrets in your configuration. at the moment, in development Cobuy expects you to have the following in config/development.js:

module.exports = {
  authentication: {
    secret: 'CHANGE-ME',
    remote: {
      google: {
        clientID: 'CHANGE-ME',
        clientSecret: 'CHANGE-ME'
      },
      facebook: {
        clientID: 'CHANGE-ME',
        clientSecret: 'CHANGE-ME'
      },
      github: {
        clientID: 'CHANGE-ME',
        clientSecret: 'CHANGE-ME'
      }
    }
  },
  mailer: {
    port: 1025,
    ignoreTLS: true
  }
}

at the moment we are using https://github.com/enspiral-pods/cobuy-config, which is a private repo for us Cobuy developers to store some secrets. see this section of the README for more information. we're missing public documentation on these secrets, sorry, you're the first external developer to try and install Cobuy. 🐱

once you get Cobuy up and running, we're not yet at a minimum viable product yet. to echo @agentlewis, i'm interested in learning more about how software like Cobuy or Cosupply would be able to support your local food production cooperative. that'd be helpful in prioritizing our development to be actually useful for the real groups we want to support.

gmarcos87 commented 7 years ago

@agentlewis A little background here: I'm from a rural town in Argentina. There are several experiences in the community shopping area and also in rural and urban production organizations. As a "client" of one of them I was asked if I could help them to generate an order management system. They generate weekly boxes and offer them via whatsapp (it is the technology that tinene closer). Many times they sell more and have to turn to other suppliers to complete their production, other times they lose orders, etc. In short, they need some way to know how much to harvest, how much they receive from remuneration for their production each and a way that the customer can order according to the stock that is remaining. Other close experiences are buying groups, which once a month buy wholesale dairy products for example. They need to complete minimum and maximum purchasing quotas, divide and distribute, generate the totals for each person, notify of changes in orders, etc. Much work on something that can be done automatically more efficiently.

Always the idea is to establish links between producers and consumers. Not only economic but to build alternatives to dominant models and empower each other. In addition to eating more healthy, local and in a sustainable way.

The technology that replaces these WhatsApp messages should be simple, accessible and easy to use. What we call here "geek free". A lot of the population does not have a knowledge in technology, nor the resources (time, devices, motivation, etc.) for complicated solutions. But they have the vocation to work the land and make it a social use.

I was contemplating using FoodSoft, and adapting it. But my skills are much closer to Node and javascript than to Ruby. Anyway it is a good software to have as a reference.

@ahdinosaur This week I'll try to get the credentials and run Cobuy locally. I added the development.js file and the error disappeared. In the readme that part is not completely clear.

I hope that development come to fruition and I am happy to contribute so early.