-
Notifications
You must be signed in to change notification settings - Fork 52
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]: unable to use this package with @actions/github-script
#499
Comments
What version of Node JS is it running under? We dropped support for anything lower than Node v18 in v5.0.0, and we also stopped using |
For some reason, clients are not getting the updated version of `@octokit/endpoint` via other packages that require `@octokit/request` See octokit/auth-app.js#499
That's odd. You need to pass a fetch API polyfill, like |
@wolfy1339 As @shaneholder pointed out the update to the request.js (which includes breaking changes) should've marked this v5.0.5 release as a breaking change rather than a patch change. I suggest that the v5.0.5 be reverted and re-released as a major change release since it includes breaking changes |
v5 dropped support for Node JS v14, 16. The fetch API is included in Node 18, hence it's not a breaking change. |
My screenshots seem to tell a different story, the first one is where I installed with node 18 running v5.0.5 of the auth-app, the result shows that there is no fetch found. We're using the setup node action to install node 18 |
I can't reproduce it locally. Node 18 has the fetch api |
It could be disabled in the builds they use, as it's still marked as experimental https://nodejs.org/en/blog/announcements/v18-release-announce |
That shouldn't be the case, as we use GitHub actions with |
I think it may be that both @shaneholder and I are using the octokit/auth-app wrapped within the actions/github-script which provides it's own reference to fetch and only supports up to node 16 it seems |
For some reason, clients are not getting the updated version of `@octokit/endpoint` via other packages that require `@octokit/request` See octokit/auth-app.js#499
Can confirm, I am also using github-script. |
@actions/github-script
fix by config nodejs version to 18 Issue: octokit/auth-app.js#499
fix by config nodejs version to 18 Issue: octokit/auth-app.js#499
fetch not in global object, add |
That is not a sensible solution. Simply pass a fetch polyfill in |
The newer versions of this package are incompatible with There is nothing for us to do here |
I'm facing the same issue. Can someone please let me know what is the resolution for this with below configuration? Runner: |
@wolfy1339 How to pass a fetch polyfill in options.request.fetch? |
@chandrakanthbala - uses: actions/setup-node@v3
with:
node-version: 16
# NOTE: Temporary fix - https://github.com/octokit/auth-app.js/issues/499#issuecomment-1599121855
- name: npm install @octokit/[email protected] @octokit/[email protected]
run: |
npm install @octokit/[email protected] @octokit/[email protected]
... I noticed that since I follow the octokit document example using |
@KevinMSampson Thanks Kevin 😃 I misread that and didn't pin the Node version to 16. This solved the issue.
@KevinMSampson Thanks Kevin 😃 I misread that and didn't pin the Node version to 16. This solved the issue. |
What happened?
It looks like between 5.0.4 and 5.0.5 dependencies were updated. I suspect that the upgrade from @octokit/request 6.0.0 to 7.0.0 may have caused this issue.
The following code throws an error in 5.0.5 when run under actions/github-script@v6
Error:
Makes me also wonder if the semver should be bumped by a major version if dependencies are bumped by a major version..
Thanks,
Shane
Versions
@octokit/[email protected] actions/github-script@v6
Relevant log output
Code of Conduct
The text was updated successfully, but these errors were encountered: