Visual Studio 2015 Community Edition Update 3 complaint that cannot find module 'react' #1170

Closed
opened 2025-08-09 17:19:08 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @holmesconan on 12/20/2016

I am using VS 2015, and the project is created by the yo aspnetcore-spa template. Everything goes well except VS2015. It always complaint that modules could not found.

I have google around and most solution is setting for Angular 2. They add some tag in the .xproj file which specified a list of typescript compiler options. I have tried them, but they do not work.

I think the code in .xproj:

<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>

already disabled the typescript compiler in VS2015, so it do not read any options in .xproj file or tsconfig.json.

But if the import could not find the module, the intellisence will not work.

UPDATE:
As the noImplicitAny option indicated, the tsconfig.json is read by VS2015. But it could not find the @types/react definition. I have tried to add a reference tag, but it is still not working.

UPDATE2:
After upgrade to the newest TypeScript v2.1.4, problems solved. This issue could be closed. Hope this is helpful for the follows.

*Originally created by @holmesconan on 12/20/2016* I am using VS 2015, and the project is created by the yo aspnetcore-spa template. Everything goes well except VS2015. It always complaint that modules could not found. I have google around and most solution is setting for Angular 2. They add some tag in the .xproj file which specified a list of typescript compiler options. I have tried them, but they do not work. I think the code in .xproj: <TypeScriptCompileBlocked>true</TypeScriptCompileBlocked> already disabled the typescript compiler in VS2015, so it do not read any options in .xproj file or tsconfig.json. But if the import could not find the module, the intellisence will not work. **UPDATE**: As the `noImplicitAny` option indicated, the tsconfig.json is read by VS2015. But it could not find the `@types/react` definition. I have tried to add a reference tag, but it is still not working. **UPDATE2**: After upgrade to the newest TypeScript v2.1.4, problems solved. This issue could be closed. Hope this is helpful for the follows.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#1170
No description provided.