Skip to content

Uncaught (in promise) TypeError: url_1.URL is not a constructor #2420

@acai2046

Description

@acai2046

Description

import { createClient } from 'redis'
const client = redis.createClient({
		url: 'redis://127.0.0.1:6379'
	});

Uncaught (in promise) TypeError: url_1.URL is not a constructor

Node.js Version

v14.0.0

Redis Server Version

Redis 5.0.14.1

Node Redis Version

`-- [email protected]

Platform

windows

Logs

Uncaught (in promise) TypeError: url_1.URL is not a constructor
    parseURL chunk-vendors.js:53223
    _RedisClient_initiateOptions chunk-vendors.js:53264
    RedisClient chunk-vendors.js:52563
    _createSuperInternal chunk-vendors.js:29839
    Commander chunk-vendors.js:74825
    create chunk-vendors.js:53217
    createClient chunk-vendors.js:45604
    _callee$ redis.js:8
    tryCatch chunk-vendors.js:56382
    makeInvokeMethod chunk-vendors.js:56463
    defineIteratorMethods chunk-vendors.js:56407
    asyncGeneratorStep chunk-vendors.js:82818
    _next chunk-vendors.js:82837
    _asyncToGenerator chunk-vendors.js:82842
    _asyncToGenerator chunk-vendors.js:82834
    redisCreateClient redis.js:3
    _callee$ main.js:6
    tryCatch chunk-vendors.js:81473
    makeInvokeMethod chunk-vendors.js:81554
    defineIteratorMethods chunk-vendors.js:81498
    asyncGeneratorStep chunk-vendors.js:26629
    _next chunk-vendors.js:26648
    _asyncToGenerator chunk-vendors.js:26653
    _asyncToGenerator chunk-vendors.js:26645
    test main.js:5
    <anonymous> main.js:12
    7RBU index.js:1127
    __webpack_require__ index.js:854
    fn index.js:151
    1 index.js:1031
    __webpack_require__ index.js:854
    checkDeferredModules index.js:46
    <anonymous> index.js:994
    <anonymous> index.js:997

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions