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
How to run in a serverless env? #1534
Comments
maybe this workaround will work for your webpack setup? |
Thanks, I'm not super familiar with webpack, so not clear in this case what my above config would look like? But I am willing to try a few things... I did try this (based on first comment): const path = require('path');
const webpack = require('webpack')
module.exports = {
entry: {
webhook: './actions/Webhook.js',
probot: './actions/Probot.js',
},
target: 'node',
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'dist'),
},
optimization: {
minimize: false
},
plugins: [
new webpack.NormalModuleReplacementPlugin(
/universal-user-agent\/dist-web\/index\.js/,
"../dist-src/index.js"
)
]
}; and const path = require('path');
module.exports = {
entry: {
webhook: './actions/Webhook.js',
probot: './actions/Probot.js',
},
target: 'node',
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'dist'),
},
optimization: {
minimize: false
},
resolve: {
// ...
alias: {
"universal-user-agent": path.resolve(
__dirname,
"node_modules/universal-user-agent/dist-src/index.js"
)
}
}
}; Neither worked... |
I think the package cause you the problem is https://github.com/gr2m/universal-github-app-jwt/
|
I'm running not sure how to resolve this (stuck on Node v12) |
This is a build issue outside of the scope of probot. Now that we have ES Modules and a standard from Node on conditional exports, that problem should go away for good once we move to it. But that will take a while. A good issue to follow is octokit/octokit.js#2128. Once we finished migrating all Octokit packages, we can migrate probot as well |
I am running into a problem running my Probot in IBM Cloud Functions (Openwhisk). It appears that it thinks I am running in a browser rather than running in NodeJS.
I think my issue is related to this: octokit/auth-app.js#59
When I initially ran it told me to convert my key to
pkcs8
. Which I did, but then I got the error thatatob
was not defined.It runs perfectly locally when I am debugging.
To run this serverless I am using
webpack
to generate a single javascript file. My config looks like:Not sure what I am missing here...
The text was updated successfully, but these errors were encountered: