Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR in node_modules/@types/koa/index.d.ts(104,14): error TS2694: Namespace '"url"' has no exported member 'URL'. #22405

Closed
stevermeister opened this issue Dec 21, 2017 · 3 comments

Comments

@stevermeister
Copy link

stevermeister commented Dec 21, 2017

import * as url from "url";

Are you sure it's correct import here?

I solved the issue by changing it from

URL: url.URL;

to just

URL: URL;

@alexey-shakura
Copy link

alexey-shakura commented Dec 21, 2017

Updating @types/node to newest version fixed this for me

@jcyongqin
Copy link

I changed the URL: url.URL; to URL: url.Url; .
and solved.

@milocosmopolitan
Copy link

Actually all you need to do is include @type/node to tsconfig compilerOptions

{
  "compilerOptions": {
    "types": [
      "node"
    ]
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants