How do I prevent (uninstall) TypeScript installing and referencing it's own @types into AppDataLocal
I'm running into a bit of a confusing issue where it seems that TypeScript
is installing its own copy of React
into it's own global cache (not sure what its called? assuming thats what it is) and referencing it in my project.
Specifically I end up with two references to React one that is located in the root of my project
C:MyProjectnode_modules@typesreact
and then another reference in
C:UsersMyUserNameAppDataLocalMicrosoftTypeScript3.0node_modules@typesreact
How do I control and uninstall references that end up in the TypeScript local
folder? What might I be doing in my project that could be causing this secondary reference?
Here is what my tsconfig.json file looks like:
"compilerOptions":
"module": "commonjs",
"moduleResolution": "node",
"target": "es5",
"sourceMap": true,
"jsx": "react",
"lib": [ "es6", "dom" ],
"removeComments": true,
"typeRoots": [
"/Types/"
]
,
"compileOnSave": false,
"exclude": [
"/node_modules/",
"/bin",
"/obj"
]
reactjs typescript npm types node-modules
add a comment |
I'm running into a bit of a confusing issue where it seems that TypeScript
is installing its own copy of React
into it's own global cache (not sure what its called? assuming thats what it is) and referencing it in my project.
Specifically I end up with two references to React one that is located in the root of my project
C:MyProjectnode_modules@typesreact
and then another reference in
C:UsersMyUserNameAppDataLocalMicrosoftTypeScript3.0node_modules@typesreact
How do I control and uninstall references that end up in the TypeScript local
folder? What might I be doing in my project that could be causing this secondary reference?
Here is what my tsconfig.json file looks like:
"compilerOptions":
"module": "commonjs",
"moduleResolution": "node",
"target": "es5",
"sourceMap": true,
"jsx": "react",
"lib": [ "es6", "dom" ],
"removeComments": true,
"typeRoots": [
"/Types/"
]
,
"compileOnSave": false,
"exclude": [
"/node_modules/",
"/bin",
"/obj"
]
reactjs typescript npm types node-modules
add a comment |
I'm running into a bit of a confusing issue where it seems that TypeScript
is installing its own copy of React
into it's own global cache (not sure what its called? assuming thats what it is) and referencing it in my project.
Specifically I end up with two references to React one that is located in the root of my project
C:MyProjectnode_modules@typesreact
and then another reference in
C:UsersMyUserNameAppDataLocalMicrosoftTypeScript3.0node_modules@typesreact
How do I control and uninstall references that end up in the TypeScript local
folder? What might I be doing in my project that could be causing this secondary reference?
Here is what my tsconfig.json file looks like:
"compilerOptions":
"module": "commonjs",
"moduleResolution": "node",
"target": "es5",
"sourceMap": true,
"jsx": "react",
"lib": [ "es6", "dom" ],
"removeComments": true,
"typeRoots": [
"/Types/"
]
,
"compileOnSave": false,
"exclude": [
"/node_modules/",
"/bin",
"/obj"
]
reactjs typescript npm types node-modules
I'm running into a bit of a confusing issue where it seems that TypeScript
is installing its own copy of React
into it's own global cache (not sure what its called? assuming thats what it is) and referencing it in my project.
Specifically I end up with two references to React one that is located in the root of my project
C:MyProjectnode_modules@typesreact
and then another reference in
C:UsersMyUserNameAppDataLocalMicrosoftTypeScript3.0node_modules@typesreact
How do I control and uninstall references that end up in the TypeScript local
folder? What might I be doing in my project that could be causing this secondary reference?
Here is what my tsconfig.json file looks like:
"compilerOptions":
"module": "commonjs",
"moduleResolution": "node",
"target": "es5",
"sourceMap": true,
"jsx": "react",
"lib": [ "es6", "dom" ],
"removeComments": true,
"typeRoots": [
"/Types/"
]
,
"compileOnSave": false,
"exclude": [
"/node_modules/",
"/bin",
"/obj"
]
reactjs typescript npm types node-modules
reactjs typescript npm types node-modules
asked Nov 13 '18 at 14:48
Maxim GershkovichMaxim Gershkovich
17.7k33114208
17.7k33114208
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
The feature that is downloading the type declarations to C:UsersMyUserNameAppDataLocalMicrosoftTypeScript3.0node_modules
is called "Automatic Type Acquisition" and is intended for JavaScript projects. Since your project has a tsconfig.json
file, Automatic Type Acquisition should be inactive and any previously downloaded files should not be used; if you have evidence that they are being used and are causing problems with your project, please update the question. Assuming you are using Visual Studio Code, you can disable Automatic Type Acquisition by setting the typescript.disableAutomaticTypeAcquisition
setting to true
.
Thanks heaps for the response and for guiding me in the right direction however no, I am using Visual Studio Enterprise 2017. Are you aware by any chance how to disable it in such a scenario?
– Maxim Gershkovich
Nov 13 '18 at 15:14
In a quick web search, I wasn't able to find a global switch to disable Automatic Type Acquisition in Visual Studio, but the documentation confirms it should be disabled for projects withtsconfig.json
. My question stands: are the downloaded files actually causing a problem with your project?
– Matt McCutchen
Nov 13 '18 at 15:20
Sorry, yes they are, I receive over 190 compiler errors for duplicate declarations, until such time that I delete the offending duplicate folders. I think I might have found the option, testing it now... github.com/Microsoft/TypeScript/issues/19369
– Maxim Gershkovich
Nov 13 '18 at 15:22
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53283595%2fhow-do-i-prevent-uninstall-typescript-installing-and-referencing-its-own-typ%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The feature that is downloading the type declarations to C:UsersMyUserNameAppDataLocalMicrosoftTypeScript3.0node_modules
is called "Automatic Type Acquisition" and is intended for JavaScript projects. Since your project has a tsconfig.json
file, Automatic Type Acquisition should be inactive and any previously downloaded files should not be used; if you have evidence that they are being used and are causing problems with your project, please update the question. Assuming you are using Visual Studio Code, you can disable Automatic Type Acquisition by setting the typescript.disableAutomaticTypeAcquisition
setting to true
.
Thanks heaps for the response and for guiding me in the right direction however no, I am using Visual Studio Enterprise 2017. Are you aware by any chance how to disable it in such a scenario?
– Maxim Gershkovich
Nov 13 '18 at 15:14
In a quick web search, I wasn't able to find a global switch to disable Automatic Type Acquisition in Visual Studio, but the documentation confirms it should be disabled for projects withtsconfig.json
. My question stands: are the downloaded files actually causing a problem with your project?
– Matt McCutchen
Nov 13 '18 at 15:20
Sorry, yes they are, I receive over 190 compiler errors for duplicate declarations, until such time that I delete the offending duplicate folders. I think I might have found the option, testing it now... github.com/Microsoft/TypeScript/issues/19369
– Maxim Gershkovich
Nov 13 '18 at 15:22
add a comment |
The feature that is downloading the type declarations to C:UsersMyUserNameAppDataLocalMicrosoftTypeScript3.0node_modules
is called "Automatic Type Acquisition" and is intended for JavaScript projects. Since your project has a tsconfig.json
file, Automatic Type Acquisition should be inactive and any previously downloaded files should not be used; if you have evidence that they are being used and are causing problems with your project, please update the question. Assuming you are using Visual Studio Code, you can disable Automatic Type Acquisition by setting the typescript.disableAutomaticTypeAcquisition
setting to true
.
Thanks heaps for the response and for guiding me in the right direction however no, I am using Visual Studio Enterprise 2017. Are you aware by any chance how to disable it in such a scenario?
– Maxim Gershkovich
Nov 13 '18 at 15:14
In a quick web search, I wasn't able to find a global switch to disable Automatic Type Acquisition in Visual Studio, but the documentation confirms it should be disabled for projects withtsconfig.json
. My question stands: are the downloaded files actually causing a problem with your project?
– Matt McCutchen
Nov 13 '18 at 15:20
Sorry, yes they are, I receive over 190 compiler errors for duplicate declarations, until such time that I delete the offending duplicate folders. I think I might have found the option, testing it now... github.com/Microsoft/TypeScript/issues/19369
– Maxim Gershkovich
Nov 13 '18 at 15:22
add a comment |
The feature that is downloading the type declarations to C:UsersMyUserNameAppDataLocalMicrosoftTypeScript3.0node_modules
is called "Automatic Type Acquisition" and is intended for JavaScript projects. Since your project has a tsconfig.json
file, Automatic Type Acquisition should be inactive and any previously downloaded files should not be used; if you have evidence that they are being used and are causing problems with your project, please update the question. Assuming you are using Visual Studio Code, you can disable Automatic Type Acquisition by setting the typescript.disableAutomaticTypeAcquisition
setting to true
.
The feature that is downloading the type declarations to C:UsersMyUserNameAppDataLocalMicrosoftTypeScript3.0node_modules
is called "Automatic Type Acquisition" and is intended for JavaScript projects. Since your project has a tsconfig.json
file, Automatic Type Acquisition should be inactive and any previously downloaded files should not be used; if you have evidence that they are being used and are causing problems with your project, please update the question. Assuming you are using Visual Studio Code, you can disable Automatic Type Acquisition by setting the typescript.disableAutomaticTypeAcquisition
setting to true
.
answered Nov 13 '18 at 15:11
Matt McCutchenMatt McCutchen
13.4k819
13.4k819
Thanks heaps for the response and for guiding me in the right direction however no, I am using Visual Studio Enterprise 2017. Are you aware by any chance how to disable it in such a scenario?
– Maxim Gershkovich
Nov 13 '18 at 15:14
In a quick web search, I wasn't able to find a global switch to disable Automatic Type Acquisition in Visual Studio, but the documentation confirms it should be disabled for projects withtsconfig.json
. My question stands: are the downloaded files actually causing a problem with your project?
– Matt McCutchen
Nov 13 '18 at 15:20
Sorry, yes they are, I receive over 190 compiler errors for duplicate declarations, until such time that I delete the offending duplicate folders. I think I might have found the option, testing it now... github.com/Microsoft/TypeScript/issues/19369
– Maxim Gershkovich
Nov 13 '18 at 15:22
add a comment |
Thanks heaps for the response and for guiding me in the right direction however no, I am using Visual Studio Enterprise 2017. Are you aware by any chance how to disable it in such a scenario?
– Maxim Gershkovich
Nov 13 '18 at 15:14
In a quick web search, I wasn't able to find a global switch to disable Automatic Type Acquisition in Visual Studio, but the documentation confirms it should be disabled for projects withtsconfig.json
. My question stands: are the downloaded files actually causing a problem with your project?
– Matt McCutchen
Nov 13 '18 at 15:20
Sorry, yes they are, I receive over 190 compiler errors for duplicate declarations, until such time that I delete the offending duplicate folders. I think I might have found the option, testing it now... github.com/Microsoft/TypeScript/issues/19369
– Maxim Gershkovich
Nov 13 '18 at 15:22
Thanks heaps for the response and for guiding me in the right direction however no, I am using Visual Studio Enterprise 2017. Are you aware by any chance how to disable it in such a scenario?
– Maxim Gershkovich
Nov 13 '18 at 15:14
Thanks heaps for the response and for guiding me in the right direction however no, I am using Visual Studio Enterprise 2017. Are you aware by any chance how to disable it in such a scenario?
– Maxim Gershkovich
Nov 13 '18 at 15:14
In a quick web search, I wasn't able to find a global switch to disable Automatic Type Acquisition in Visual Studio, but the documentation confirms it should be disabled for projects with
tsconfig.json
. My question stands: are the downloaded files actually causing a problem with your project?– Matt McCutchen
Nov 13 '18 at 15:20
In a quick web search, I wasn't able to find a global switch to disable Automatic Type Acquisition in Visual Studio, but the documentation confirms it should be disabled for projects with
tsconfig.json
. My question stands: are the downloaded files actually causing a problem with your project?– Matt McCutchen
Nov 13 '18 at 15:20
Sorry, yes they are, I receive over 190 compiler errors for duplicate declarations, until such time that I delete the offending duplicate folders. I think I might have found the option, testing it now... github.com/Microsoft/TypeScript/issues/19369
– Maxim Gershkovich
Nov 13 '18 at 15:22
Sorry, yes they are, I receive over 190 compiler errors for duplicate declarations, until such time that I delete the offending duplicate folders. I think I might have found the option, testing it now... github.com/Microsoft/TypeScript/issues/19369
– Maxim Gershkovich
Nov 13 '18 at 15:22
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53283595%2fhow-do-i-prevent-uninstall-typescript-installing-and-referencing-its-own-typ%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown