Throws error "URL is not defined"
See original GitHub issueExpected Behavior
Some vulnerability report should be shown as output
Current Behavior
λ npx is-website-vulnerable http://google.com
npx: installed 235 in 24.612s
URL is not defined
Steps to Reproduce (for bugs)
- run
npx is-website-vulnerable http://google.com
- wait for results
- read error
URL is not defined
Your Environment
- Library Version used: latest
- Node.js version: 8.16.1
- Operating System: Windows 10, up to date
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (7 by maintainers)
Top Results From Across the Web
URL is not defined in node.js - Stack Overflow
Try to add this line: var URL = require('url').URL;. The full example is here: var URL = require('url').URL; var myURL = new ...
Read more >ReferenceError: URL is not defined [Temporary fix] · Issue #859
Hello, i am using the current version 4.4.3, i am getting ReferenceError: URL is not defined i had to comment out line 84...
Read more >[Solved] Make Build Error (URL not defined) - Install & Config
I installed the npm packages using yarn instead of npm , just got encountered hang problem in npm install due to git --config...
Read more >ReferenceError: URL is not defined - Nehemiah Blog
Workaround: In case if you can't or don't want to upgrade, you can add the var URL = require('url').URL; in the js file...
Read more >URL | Node.js v19.3.0 Documentation
A TypeError will be thrown if the input or base are not valid URLs. ... if urlObject.protocol is not undefined and is not...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Upgrading Node.js to v12.11.1 solved the issue, like you suggested. I didn’t test on < 10 since I didn’t see new comment saying you implemented workaround at the time I did the upgrade. Working fine now. Thanks for the quick fix!
Can confirm that it’s working on v8.16 now as well.