Closed
Description
Hello,
I'm facing this error when I try to request the API. My project uses the following packages:
"@octokit/auth-app": "^2.4.4"
"@octokit/rest": "^17.1.4"
"typescript": "^3.8.2"
import { createAppAuth } from "@octokit/auth-app";
import { Octokit } from "@octokit/rest"
const appOctokit = new Octokit({
authStrategy: createAppAuth,
auth: {
id: APP_ID,
privateKey: PRIVATE_KEY
}
})
const { data } = await appOctokit.request("/app");
console.log(data)
"errorType": "ReferenceError",
"errorMessage": "atob is not defined",
"stack": [
"ReferenceError: atob is not defined",
" at getDERfromPEM (/var/task/webpack:/myapp/node_modules/universal-github-app-jwt/dist-web/index.js:15:1)",
" at getToken (/var/task/webpack:/myapp/node_modules/universal-github-app-jwt/dist-web/index.js:50:1)",
" at githubAppJwt (/var/task/webpack:/myapp/node_modules/universal-github-app-jwt/dist-web/index.js:71:1)",
" at getAppAuthentication (/var/task/webpack:/myapp/node_modules/@octokit/auth-app/dist-web/index.js:8:37)",
" at getInstallationAuthentication (/var/task/webpack:/myapp/node_modules/@octokit/auth-app/dist-web/index.js:110:1)",
" at dist_web_hook (/var/task/webpack:/myapp/node_modules/@octokit/auth-app/dist-web/index.js:240:20)",
...
]
I tried to install the package atob-lite
cause it was a dependency in the past https://github.com/octokit/rest.js/pull/1302, but it doesn't fix the issue.