Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install issue #54

Open
gugaiz opened this issue Aug 17, 2020 · 8 comments
Open

Install issue #54

gugaiz opened this issue Aug 17, 2020 · 8 comments

Comments

@gugaiz
Copy link

gugaiz commented Aug 17, 2020

I just cloned the repo and ran

yarn install
yarn start

as the readme suggests, but I got when I ran yarn start

core:       [14:51:22] Starting compilation in watch mode...
.:          internal/modules/cjs/loader.js:329
.:                throw err;
.:                ^
.:          Error: Cannot find module '/var/www/deliverybot/node_modules/@deliverybot/deploybot/lib/index.js'. Please 
...
.:          error Command failed with exit code 1.
.:          info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Any suggestions?

@colinjfw
Copy link
Collaborator

That most likely means that @deliverybot/deploybot wasn't loaded locally or built. It looks like it's defined here in the yarn workspaces configuration https://github.com/deliverybot/deliverybot/blob/master/package.json#L9.

@gugaiz
Copy link
Author

gugaiz commented Aug 18, 2020

Thanks for your answer @colinjfw. I got that package when I ran yarn install but there is no lib directory inside

$ ls node_modules/@deliverybot/deploybot
jest.config.js  node_modules  package.json  README.md  src  test  tsconfig.json

I realized that there is a missing step on the README.. yarn build

@gugaiz
Copy link
Author

gugaiz commented Aug 18, 2020

Now it seems I am missing the secrets but not sure where to place them

app:        Synced partials to lib/views/partials.js
.:          /var/www/deliverybot/node_modules/@octokit/webhooks/index.js:11
.:              throw new Error('options.secret required')
.:              ^
.:          Error: options.secret required
.:              at new createWebhooksApi (/var/www/deliverybot/node_modules/@octokit/webhooks/index.js:11:11)
.:              at Object.probot (/var/www/deliverybot/packages/core/lib/probot.js:64:17)
.:              at Object.load (/var/www/deliverybot/packages/core/lib/app.js:35:26)
.:              at Object.<anonymous> (/var/www/deliverybot/packages/run/lib/index.js:39:25)
.:              at Module._compile (internal/modules/cjs/loader.js:1137:30)
.:              at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
.:              at Module.load (internal/modules/cjs/loader.js:985:32)
.:              at Function.Module._load (internal/modules/cjs/loader.js:878:14)
.:              at Module.require (internal/modules/cjs/loader.js:1025:19)
.:              at require (internal/modules/cjs/helpers.js:72:18)
.:          error Command failed with exit code 1.
.:          info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
.:          server exited with code 1
run:        webpack is watching the files…

@denschu
Copy link

denschu commented Aug 19, 2020

@gugaiz I think you need to create a GitHub app first: https://docs.github.com/en/developers/apps/creating-a-github-app
After that you can fill out the values for the variables in the .env file.
I followed this steps: https://probot.github.io/docs/development/#manually-configuring-a-github-app

@colinjfw Can you help us on how to configure the GitHub app to be able to run deliverybot in our local development environment? Especially it would be interesting to know which values we need to provide for the "User authorization callback URL". An empty value leads to that message: "This GitHub App must be configured with a callback URL".

Thanks in advance :-)

@denschu
Copy link

denschu commented Aug 20, 2020

Ok, for local development this issue is helpful: #44
The BASE_URL needs to be set.
Next step would be to get it up and running with a cloud provider, e.g. AWS (Beanstalk) :-) Anyone successful with that and can help us?
I saw that yarn start does some proxy handling with Smee, so that seems not to be the right command for production.

@colinjfw
Copy link
Collaborator

Can you help us on how to configure the GitHub app to be able to run deliverybot in our local development environment?

Yes definitely, so the most important part here is the .env.example file in the root of the directory. First step is to copy that file to .env and then fill in all of the environment variables. This will entail creating a GitHub App with the same permissions as described as in the file app.yml.

@denschu
Copy link

denschu commented Aug 24, 2020

@colinjfw Thanks for your reply 👍 Can you also give us some insights on how to configure, build and run deliverybot for the production deployment?

@ramene
Copy link

ramene commented Aug 28, 2020

@gugaiz I think you need to create a GitHub app first: https://docs.github.com/en/developers/apps/creating-a-github-app
After that you can fill out the values for the variables in the .env file.
I followed this steps: https://probot.github.io/docs/development/#manually-configuring-a-github-app

@colinjfw Can you help us on how to configure the GitHub app to be able to run deliverybot in our local development environment? Especially it would be interesting to know which values we need to provide for the "User authorization callback URL". An empty value leads to that message: "This GitHub App must be configured with a callback URL".

Thanks in advance :-)

@gugaiz /login/cb

app.get("/login/cb", csrf, callback);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants