-
Notifications
You must be signed in to change notification settings - Fork 766
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
Uncaught SyntaxError: Unexpected token import #392
Comments
This library is written in ES2015 which, while finalized, is not fully supported in any browser. How are you bringing in the library? |
I'm using a Cordova/PhoneGap app on ios10 but testing in Safari 10 (Mac) which should support it?? From: Clay Reimann [notifications@github.com] This library is written in ES2015 which, while finalized, is not fully supported in any browser. How are you bringing in the library? � |
Again, ES2015 is not fully supported, and I'm 95% confident that no-one supports the |
Not sure how relevant my comment is going to be here, but if issue still open, and I've recently spotted on the same error, I decided to add my 5 cents here. First of all, I use My existed code uses import/export, and I was a bit surprised, when I did a few lines of code with So... Note: Bower-related variants can be ignored, due to the fact that Bower died. And github-api is available via npm and yarn. Variant ==A==
By changing code in GitHub.js from Variant ==A.1==
Variant ==B==
And I receive an error:
Variant ==C==
added type="module" and receive an error:
Variant ==D==
I kinda got it, that it's such a ability to have ONLY GitHub.js, but for what reason, if it can be used?
"axios" means, that some code in GitHub.js depends on Requestable.js, right? if so, then GitHub.js CAN NOT be used independently. Variant ==E== - my winner at the moment.
and all works fine window has object Variant ==E.1==
also works fine with simple HTML/JS/ES6 import/export syntax. Variant ==F==
gives me success response But if only I change first line to this the running command
And it's is ok so far, because of:
Not sure, if @clayreimann is main maintainer so far, and I have no idea where this library/tool is used, and what is roadmap, etc, and despite the fact, GitHub API v4 exists, I would kindly suggest:
|
geting this error in Chrome (Uncaught SyntaxError: Unexpected token import) with this line of code
"import GitHub from 'github-api';"??
The text was updated successfully, but these errors were encountered: