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

Tests fail on node 18 #87

Closed
wmurphyrd opened this issue Jan 29, 2023 · 2 comments · Fixed by #103
Closed

Tests fail on node 18 #87

wmurphyrd opened this issue Jan 29, 2023 · 2 comments · Fixed by #103

Comments

@wmurphyrd
Copy link
Member

Somehow, native fetch is being invoked in the jsonld document loader, bypassing mocks

(node:81130) 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)
    jsonld context caching
      ✗ fetches and caches new contexts
        - jsonld.InvalidUrl: Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context.
      ✗ caches redirected contexts by original url
        - jsonld.InvalidUrl: Dereferencing a URL did not result in a valid JSON-LD object. Possible causes are an inaccessible URL perhaps due to a same-origin policy (ensure the server uses CORS if you are using client-side JavaScript), too many redirects, a non-JSON response, or more than one HTTP Link Header was provided for a remote context.

wmurphyrd added a commit that referenced this issue Jan 29, 2023
@aspalding
Copy link
Contributor

nock issue for reference - nock/nock#2397

@aspalding aspalding mentioned this issue Oct 3, 2023
@santisbon
Copy link

@wmurphyrd the workaround of using node --no-experimental-fetch is not working for me. Am I doing something wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants