简体   繁体   English

VS 2015和Angular2 RC Typescript虚拟项目错误

[英]VS 2015 & Angular2 RC Typescript Virtual Project error

I am trying to get the Angular 2 RC up and running in a Visual Studio 2015 project I have and I am getting the "@angular/core" module not found from a file in my Typescript Virtual Project. 我正在尝试在我拥有的Visual Studio 2015项目中启动并运行Angular 2 RC,并且正在从Typescript虚拟项目中的文件中找不到“ @ angular / core”模块。 Everything is fine in the actual project. 在实际项目中一切都很好。

I am thinking maybe the virtual project needs to be recompiled or something? 我在想虚拟项目可能需要重新编译或其他? I really don't understand Virtual Projects all that much. 我真的不太了解虚拟项目。

Any ideas? 有任何想法吗? Thanks in advance! 提前致谢!

In case anyone is interested - the issue was eventually resolved by a variety of making sure the correct version of TypeScript was being referenced, by closing and reopening Visual Studio (to refresh the virtual projects) and making sure the settings in the tsconfig file were correct. 万一有兴趣的人–通过关闭并重新打开Visual Studio(以刷新虚拟项目)并确保tsconfig文件中的设置正确无误,最终可以通过确保引用了正确版本的TypeScript来解决此问题。 。

Feel free to reach out if you have any questions 如有任何疑问,请随时与我们联系

EDIT: To answer question in comments @Richard Nalezynski: 编辑:要回答评论@Richard Nalezynski中的问题:

My tsconfig.json now looks as the following: 我的tsconfig.json现在看起来如下:

{
  "compileOnSave": true,
  "compilerOptions": {
    "target": "es6",
    "module": "commonjs",
    "moduleResolution": "node",
    "sourceMap": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "removeComments": false,
    "noImplicitAny": false
  },
  "exclude": ["node_modules"]
}

If you have questions about any specific line items, let me know. 如果您对任何特定的订单项有疑问,请告诉我。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM