github-tools / github-tools/github
Requestable.js `require('js-base64')` returns an empty object
- 主要言語
- JavaScript
- スター
- 3.8k
- フォーク
- 809
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Hey guys, I'm facing a strange issue. On my distribution Requestable.js, `require('js-base64')` returns an empty object.
Line 15, `node_modules/github-api/dist/components/Requestable.js`
```javascript
var _jsBase = require('js-base64');
console.log(_jsBase) // {}
```
So then, when it tries to encode the username and password using base64 in line 96:
```javascript
this.__authorizationHeader = 'Basic ' + _jsBase.Base64.encode(auth.username + ':' + auth.password);
```
Of course that it fails as `_jsBase` doesn't have a property `Base64`. Do you know what might be going on?
This is my package.json:
```json
{
"name": "github",
"version": "0.0.0",
"description": "Hello Expo!",
"author": null,
"private": true,
"main": "main.js",
"dependencies": {
"expo": "16.0.0",
"github-api": "^3.0.0",
"react": "16.0.0-alpha.6",
"react-native": "https://github.com/expo/react-native/archive/sdk-16.0.0.tar.gz"
},
"devDependencies": {
"babel-plugin-add-module-exports": "^0.2.1",
"buffer": "^5.0.6"
}
}
```
and `js-base64` seems to be installed correctly.
Thanks!

コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
Start in node_modules/github-api/dist/components/Requestable.js at lines 15 and 96, then inspect how the installed js-base64 package exports its Base64 API under the versions in package.json. Reproduce the require result in the reported Expo/React Native setup; done means authentication can construct the Basic authorization header without _jsBase being empty.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- api
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100