Skip to content
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

[BUG]: CJS Loader "Unexpected token '{'" #2663

Closed
maka-io opened this issue Apr 26, 2024 · 3 comments
Closed

[BUG]: CJS Loader "Unexpected token '{'" #2663

maka-io opened this issue Apr 26, 2024 · 3 comments
Labels
Type: Support Any questions, information, or general needs around the SDK or GitHub APIs

Comments

@maka-io
Copy link

maka-io commented Apr 26, 2024

What happened?

In a MeteorJS environment, adding import { Octokit } from 'octokit' results in immediate crash.

Versions

Octokit v3.2.0
Node v. 14.21.4

Relevant log output

app/node_modules/@octokit/core/dist-node/index.js:42
W20240425-13:36:58.188(-4)? (STDERR)   static {
W20240425-13:36:58.188(-4)? (STDERR)          ^
W20240425-13:36:58.188(-4)? (STDERR) 
W20240425-13:36:58.188(-4)? (STDERR) SyntaxError: Unexpected token '{'
W20240425-13:36:58.188(-4)? (STDERR)     at wrapSafe (internal/modules/cjs/loader.js:1031:16)
W20240425-13:36:58.189(-4)? (STDERR)     at Module._compile (internal/modules/cjs/loader.js:1080:27)


### Code of Conduct

- [X] I agree to follow this project's Code of Conduct
@maka-io maka-io added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Apr 26, 2024
Copy link

👋 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! 🚀

@wolfy1339
Copy link
Member

wolfy1339 commented Apr 26, 2024

You have to use ESM and we target ES2022.

We require NodeJS v18+

@wolfy1339 wolfy1339 added Type: Support Any questions, information, or general needs around the SDK or GitHub APIs and removed Type: Bug Something isn't working as documented Status: Triage This is being looked at and prioritized labels Apr 26, 2024
@wolfy1339 wolfy1339 closed this as not planned Won't fix, can't repro, duplicate, stale Apr 26, 2024
@wolfy1339
Copy link
Member

As per the Meteor docs,

Meteor 2.x runs on a deprecated Node.js version (14). Meteor 3.0, currently in its Release Candidate version, runs on Node.js v20. For more information, please consult our migration guide.

We support the 2 latest LTS releases, and provide support for the latest release.

The version we require is documented in our package.json and our build scripts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Support Any questions, information, or general needs around the SDK or GitHub APIs
Projects
Archived in project
Development

No branches or pull requests

2 participants