Cannot find module @angular/core + angular2

后端 未结 4 1864
旧时难觅i
旧时难觅i 2021-01-03 04:45

I am trying to create an Angular 2 application using Typescript in Visual Studio 2015. I have installed npm on my machine. When I compile my application , I am getting error

4条回答
  •  旧时难觅i
    2021-01-03 05:11

    When I had this issue, it would come and go depending on the module kind I had selected. (Visual Studio, right-click project, properties, Typescript tab. It would occur for the "System" Module System, which is used in Angular2 QuickStart tutorial, but not for some others, for example.)

    I verified the folder /node_modules/@angular/core/ existed in the proj and was populated.

    Solution was to edit the .csproj file and add the line Node in both Debug and Release sections. VS defaults to Classic for this setting for some settings of ModuleKind.

提交回复
热议问题