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]: '@octokit/plugin-paginate-graphql' does not provide an export named 'paginateGraphQL' #177

Closed
1 task done
jyasskin opened this issue Mar 8, 2024 · 3 comments · Fixed by #178
Closed
1 task done
Labels
released Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented

Comments

@jyasskin
Copy link

jyasskin commented Mar 8, 2024

What happened?

If you install @octokit/plugin-paginate-graphql and @octokit/core and try to run the sample code from https://github.com/octokit/plugin-paginate-graphql.js?tab=readme-ov-file#usage, you get SyntaxError: The requested module '@octokit/plugin-paginate-graphql' does not provide an export named 'paginateGraphQL'

Run npm test in https://stackblitz.com/edit/plugin-paginate-graphql-bug-20240307?file=index.mjs&view=editor to see the error.

Versions

  • Node v18.18.0 or v20.10.0
  • "@octokit/core": "^6.0.1",
  • "@octokit/plugin-paginate-graphql": "^5.0.0"

Relevant log output

~/projects/plugin-paginate-graphql-bug-20240307
❯ npm install

added 11 packages in 331ms

~/projects/plugin-paginate-graphql-bug-20240307
❯ npm test

> test
> node index.mjs

file:///home/projects/plugin-paginate-graphql-bug-20240307/index.mjs:2
import { paginateGraphQL } from "@octokit/plugin-paginate-graphql";
         ^^^^^^^^^^^^^^^
SyntaxError: The requested module '@octokit/plugin-paginate-graphql' does not provide an export named 'paginateGraphQL'
    at ModuleJob._instantiate (https://pluginpaginategraphqlbug202403-bood.w-credentialless-staticblitz.com/blitz.8e1c3ef8.js:181:1509)
    at async ModuleJob.run (https://pluginpaginategraphqlbug202403-bood.w-credentialless-staticblitz.com/blitz.8e1c3ef8.js:181:2327)

Code of Conduct

  • I agree to follow this project's Code of Conduct
@jyasskin jyasskin added Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented labels Mar 8, 2024
Copy link

github-actions bot commented Mar 8, 2024

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

@jyasskin
Copy link
Author

jyasskin commented Mar 8, 2024

Changing "dist-node" to "dist-web" at

import: "./dist-node/index.js",

inside of node_modules/@octokit/plugin-paginate-graphql/package.json in the stackblitz workspace fixes the problem, but that doesn't seem like the cleanest fix.

Copy link

🎉 This issue has been resolved in version 5.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Status: Triage This is being looked at and prioritized Type: Bug Something isn't working as documented
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant