github-tools / github-tools/github

Requestable.js `require('js-base64')` returns an empty object

Offen
#447 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
3.8k
Forks
809
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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!

![image](https://cloud.githubusercontent.com/assets/872296/25547987/b8fe4bfc-2c40-11e7-8e2c-88f644b4a447.png)

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.