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

Visual Studio 2017 IntelliSense show errors in @types folder even for unused modules #20253

Closed
ArtemAvramenko opened this issue Nov 24, 2017 · 6 comments
Assignees
Labels
Needs More Info The issue still hasn't been fully clarified

Comments

@ArtemAvramenko
Copy link

TypeScript Version: 2.3
Visual Studio Version: 15.4.4

When I open my solution, Typescript shows error in this file:

C:\Users\USERNAME\AppData\Local\Microsoft\TypeScript\node_modules@types\requirejs\index.d.ts

I use NuGet to get all type definitions I need. How to stop use definitions from this folder for IntelliSense?

Expected behavior:

I do not use requirejs module, so I expect that IntelliSense does not show this error

Actual behavior:

I get error:

Error TS2403 (TS) Subsequent variable declarations must have the same type. Variable 'require' must be of type 'NodeRequire', but here has type 'Require'.

@mhegazy
Copy link
Contributor

mhegazy commented Dec 1, 2017

Can you share your project?

@mhegazy mhegazy added the Needs More Info The issue still hasn't been fully clarified label Dec 1, 2017
@mhegazy
Copy link
Contributor

mhegazy commented Dec 1, 2017

//CC @billti

@ArtemAvramenko
Copy link
Author

I cannot share my project, but I think the problem is caused by bug #14565

@billti
Copy link
Member

billti commented Dec 6, 2017

@RyanCavanaugh any idea? I'm guessing something is including the Node.js definition for the global require, and something is includes the requirejs global definition for require.

Do you have JavaScript & TypeScript source files included directly in your project? Are you using a tsconfig.json file anywhere in the project?

@ArtemAvramenko
Copy link
Author

Do you have JavaScript & TypeScript source files included directly in your project?

Yes, this is the old MVC project.

Are you using a tsconfig.json file anywhere in the project?

No, I'm not.

@RyanCavanaugh
Copy link
Member

Closing due to lack of interest/activity - presumed fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs More Info The issue still hasn't been fully clarified
Projects
None yet
Development

No branches or pull requests

4 participants