question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dom-service-worker-tests: Reference Error: Headers is not defined

See original GitHub issue

Getting this locally. I’m guessing I’ve failed to install another dependency.

==> X org.http4s.dom.ServiceWorkerSuite.ServiceWorker Execute GET /internal-server-error 0.00s scala.scalajs.js.JavaScriptException: ReferenceError: Headers is not defined
    at <jscode>.{anonymous}()(/Users/ross.baker/src/http4s/dom-service-worker-tests/.js/target/scala-2.12/http4s-dom-service-worker-tests-test-fastopt/main.js:57864)
    at scala.scalajs.runtime.AnonFunction1.apply(/Users/ross.baker/src/http4s/dom-service-worker-tests/.js/target/scala-2.12/http4s-dom-service-worker-tests-test-fastopt/main.js:131705)
    at cats.effect.IOFiber.runLoop(/Users/ross.baker/src/http4s/dom-service-worker-tests/.js/target/scala-2.12/http4s-dom-service-worker-tests-test-fastopt/main.js:221959)
    at cats.effect.IOFiber.execR(/Users/ross.baker/src/http4s/dom-service-worker-tests/.js/target/scala-2.12/http4s-dom-service-worker-tests-test-fastopt/main.js:222730)
    at cats.effect.IOFiber.run(/Users/ross.baker/src/http4s/dom-service-worker-tests/.js/target/scala-2.12/http4s-dom-service-worker-tests-test-fastopt/main.js:223185)
    at <jscode>.{anonymous}()(/Users/ross.baker/src/http4s/dom-service-worker-tests/.js/target/scala-2.12/http4s-dom-service-worker-tests-test-fastopt/main.js:88589)
    at scala.scalajs.runtime.AnonFunction0.apply(/Users/ross.baker/src/http4s/dom-service-worker-tests/.js/target/scala-2.12/http4s-dom-service-worker-tests-test-fastopt/main.js:131681)
    at <jscode>.Immediate.$c_sjs_js_Any$.fromFunction0__F0__sjs_js_Function0 [as _onImmediate](/Users/ross.baker/src/http4s/dom-service-worker-tests/.js/target/scala-2.12/http4s-dom-service-worker-tests-test-fastopt/main.js:131647)
    at <jscode>.processImmediate(node:internal/timers:464)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
armanbilgecommented, Sep 20, 2021

I can create an alias. It would be something like ; project rootJVM; +test; project rootNodeJS; set Global / useJSEnv := JSEnv.NodeJS; +test; project rootBrowser; set Global / useJSEnv := JSEnv.Firefox; +test; set Global / useJSEnv := JSEnv.Chrome; +test; project /; set Global / useJSEnv := JSEnv.NodeJS

1reaction
rossabakercommented, Sep 20, 2021

I’m fine with running a few commands. I just don’t know how to run those DOM projects at all locally… or validate that they are safe from the GHSA we’re working on.

Read more comments on GitHub >

github_iconTop Results From Across the Web

reactjs - 'ReferenceError: Headers is not defined' when using ...
I'm setting up a new application in React and I want it to be server side rendered. Unfortunately I'm not able to use...
Read more >
ReferenceError: Headers is not defined · Issue #56 - GitHub
When using swiftype-app-search-javascript to do search in an app using coffee script, I got Headers is not defined error.
Read more >
javascript api call - Headers is not defined - LinuxQuestions.org
I want to use javascript to send an SMS using sms.to According this this api documentation , I should do it like this....
Read more >
Headers is not defined' when using Headers in a server side ...
Coding example for the question 'ReferenceError: Headers is not defined' when using Headers in a server side rendered react project-Reactjs.
Read more >
Headers not found - Coding Help - Glitch Support
I use for that the “fetch” JS function with some Headers. My problem is the following : Glitch ... ReferenceError: Headers is not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found