URL is not defined
See original GitHub issueI followed the instructions in step 4 of the README to get the automated benchmark driver running, and everything installed without errors.
I’ve successfully built and run the keyed/preact
benchmark via the web-server.
I then tried to run the benchmark under the webdriver-ts
, and it fails:
$ npm run bench keyed/preact
> webdriver-ts@1.0.0 bench /mnt/c/workspace/js-framework-benchmark/webdriver-ts
> cross-env LANG="en_US.UTF-8" node dist/benchmarkRunner.js "keyed/preact"
/mnt/c/workspace/js-framework-benchmark/webdriver-ts/node_modules/lighthouse/lighthouse-core/lib/url-shim.js:35
class URLShim extends URL {
^
ReferenceError: URL is not defined
at Object.<anonymous> (/mnt/c/workspace/js-framework-benchmark/webdriver-ts/node_modules/lighthouse/lighthouse-core/lib/url-shim.js:35:23)
at Module._compile (internal/modules/cjs/loader.js:654:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
at Function.Module._load (internal/modules/cjs/loader.js:498:3)
at Module.require (internal/modules/cjs/loader.js:598:17)
at require (internal/modules/cjs/helpers.js:11:18)
at Object.<anonymous> (/mnt/c/workspace/js-framework-benchmark/webdriver-ts/node_modules/lighthouse/lighthouse-core/lib/network-request.js:14:13)
at Module._compile (internal/modules/cjs/loader.js:654:30)
Looks like a similar problem was reported and fixed earlier in #593.
But it looks like we’re still missing a URL
polyfill for node or something?
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (6 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 >ReferenceError: URL is not defined - Nehemiah Blog
If you are using Node 8.11.2-x64, you may experience the below error when trying to fetch client packages like bootstrap or jquery from...
Read more >Uncaught ReferenceError: url is not defined - JavaScript
I'm attempting to parse the URL into a variable, but I receive the following error: Uncaught ReferenceError: url is not defined.
Read more >URL | Node.js v19.3.0 Documentation
WHATWG URL's origin property includes protocol and host , but not username or password . ... Removes the stored <Blob> identified by the...
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
Closing it - since last test on windows looked “good” (not including the delay…)
An alternative would be to try the docker build as explained in the wiki. I tested it since yesterday on windows. It worked fine on my machine, but it takes literally days to run all benchmarks. After 14 hours all keyed implementations were done. If you decide to give it a shot please tell me about your experience with it.