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.

1.0.0 and 1.0.0-beta10, Fix for ReferenceError: URL is not defined

See original GitHub issue

1.0.0-beta10 produces ReferenceError: URL is not defined.

Here is the proposed fix which seems to work for me in: jwt.interceptor.ts

const URL = require('url');

  // inside isWhitelistedDomain method
  isWhitelistedDomain(request: HttpRequest<any>): boolean {
    // const requestUrl = new URL(request.url);
    const requestUrl = URL.parse(request.url, false, true);
    ...

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
noumaanscommented, Mar 11, 2018

PR submitted.

1reaction
noumaanscommented, Mar 11, 2018

@chenkie I was hoping this fix would make it into 1.0.0. Can you please prioritize this (it’s a one-liner). Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught ReferenceError: url is not defined - Stack Overflow
I am new to java script, just started learning about it a week or so ago, and browser is telling me "Uncaught ReferenceError:...
Read more >
Uncaught ReferenceError: slicewp is not defined
Hello! We believe that this plugin has this error due to WP Rocket but no matter what scripts we exclude from WP Rocket...
Read more >
ReferenceError - JavaScript - MDN Web Docs
The ReferenceError object represents an error when a variable that doesn't exist (or hasn't yet been initialized) in the current scope is ...
Read more >
How to Fix '$ is not defined' Errors in JavaScript - Webtips
Learn what causes 'Uncaught ReferenceError: $ is not defined' errors in JavaScript, and how you can fix them in various ways.
Read more >
ReferenceError: url is not defined [closed]
Looks like someone has inserted some javascript in you head element. At see ~ line 110 of your dom. <script> function popupwindow(w, ...
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