Comments (4)
Glad you got it working!
I hope all the compliation-related problems will go away once we fully transition to ES Modules. It will happen eventually, but we cannot give an ETA unfortunately.
from core.js.
👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with Status: Up for grabs
. You & others like you are the reason all of this works! So thank you & happy coding! 🚀
from core.js.
When using in browser, I'd recommend to use a smaller library. octokit
comes with a lot of features and code and results in a big bundle size. Could you try if you see the same problem with @octokit/core
.
You can also try importing from https://esm.sh. Try
import { Octokit } from 'https://esm.sh/@octokit/core@5'
to see if you see the same error. If you don't, it might be a problem how the imported octokit
module is bundled in your setup
from core.js.
Thank you, @gr2m, that's very helpful input 👍🏻
I tried importing Octokit from esm.sh
like this import { Octokit } from 'https://esm.sh/octokit';
And that actually works.
What I ended up on, for now, is to only import @octokit/rest
in the browser instead of the full Octokit.
However, that still throws the original error - but I got past that by transpiling @octokit/core
.
I just added it to our next config:
const nextConfig = {
...rest of config
transpilePackages: ['@octokit/core']
...
}
module.exports = nextConfig
And that works fine.
from core.js.
Related Issues (20)
- [DOCS]: Error response schema HOT 3
- [BUG]: Uncaught ReferenceError: global is not defined HOT 7
- [BUG]: octokit.graphql gives increasing number of duplicate HOT 1
- [BUG]: can not intercept requests with nock HOT 2
- [BUG]: Octokit version 4.2.2 has a breaking change dependency upgrade HOT 2
- https://github.com/ietf-tools/datatracker/commit/e68b9cf60c0f6771e40ed73a4f59aa47cacbb854
- Re-enable tests in `@octokit/core` using fetch dispatchers HOT 2
- Avoid JSON.stringify hack when testing responses of fetch-mock HOT 7
- Replace `toStrictEqual` with `JSON.stringify` Response assertions with `toEqual` in `core.js` HOT 1
- [BUG]: Rest call to delete comment returns 404 HOT 3
- [MAINT]: Replace lolex with @sinon/fake-timers HOT 2
- [BUG]: OctokitOptions declared locally but not exported HOT 7
- [QUESTION] Is there an alternative version of this project written in c#? HOT 2
- [BUG]: The type of 'data' field in OctokitResponse type is an object but type hinting show it's an array HOT 2
- [BUG]: Commit not found when it exists HOT 2
- [BUG]: `No "exports" main defined` in version 6.0.1 HOT 5
- [BUG/ASK for HELP]: Issues with `@octokit/[email protected]+` when using `ncc` to bundle code HOT 6
- [BUG]: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in HOT 24
- 👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a [process in place](https://github.com/octokit/.github/blob/main/community/prioritization_response.md#overview) for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with `Status: Up for grabs`. You & others like you are the reason all of this works! So thank you & happy coding! 🚀 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from core.js.