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

The Fetch API is an experimental feature #526

Closed
websolutions-hamburg opened this issue Sep 16, 2022 · 3 comments
Closed

The Fetch API is an experimental feature #526

websolutions-hamburg opened this issue Sep 16, 2022 · 3 comments
Labels
Type: Support Any questions, information, or general needs around the SDK or GitHub APIs

Comments

@websolutions-hamburg
Copy link

Is it possible to disable the ExperimentalWarning "The Fetch API is an experimental feature." which is displayed since Node.js 18?

Current Node.js: v18.9.0

(node:6335) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)

with --trace-warnings:

(node:73578) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
    at emitExperimentalWarning (node:internal/util:226:11)
    at fetch (node:internal/process/pre_execution:213:5)
    at fetchWrapper (/project/node_modules/@octokit/request/dist-node/index.js:32:10)
    at newApi (/project/node_modules/@octokit/request/dist-node/index.js:152:14)
    at graphql (/project/node_modules/@octokit/graphql/dist-node/index.js:73:10)
    at newApi (/project/node_modules/@octokit/graphql/dist-node/index.js:92:12)

@wolfy1339 wolfy1339 added the Type: Support Any questions, information, or general needs around the SDK or GitHub APIs label Sep 17, 2022
@wolfy1339
Copy link
Member

Unfortunately not.

This is an error given by Node, and not us.

Since Node v18, the fetch API was implemented, and it's still an experimental feature hence the error.

@websolutions-hamburg
Copy link
Author

Oh ok, so is it correct that you have not changed anything and Node.js 18 has now simply replaced the old fetch function with the new API.

@wolfy1339
Copy link
Member

That is correct, we haven't changed any code.

There was never a builtin fetch function in NodeJS until v18, the node-fetch package provided an implementation of that function, and falls back to new builtin fetch function on Node v18

skaldarnar added a commit to MovingBlocks/movingblocks.github.com that referenced this issue Jan 2, 2023
Due to octokit/request.js#526 and node-fetch/node-fetch#1566 we need to disable the experimental Fetch API introduced in Node.js 18.x.
skaldarnar added a commit to MovingBlocks/movingblocks.github.com that referenced this issue Jan 5, 2023
…y module info (#179)

- feat(source-terasology-module): custom source plugin to fetch Terasology module information
  - basic information: name, url, description,  homepageUrl
  - include URL to custom `cover` image if defined
  - parse `module.txt` and enrich it with `tags` (also skip repos without 'module.txt' on branch 'develop')
  - include content of `README.md`
- chore: build with `NODE_OPTIONS='--no-experimental-fetch'` to avoid warning about experimental Fetch API in Node 18.x (see octokit/request.js#526 and node-fetch/node-fetch#1566)
- doc(source-terasology-module): document basic usage of the source plugin
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
None yet
Development

No branches or pull requests

2 participants