Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Angular.io Webpack Intro with VS 2015 Update 3 - documentation #3227

Closed
miladchamo opened this issue Feb 9, 2017 · 6 comments
Closed

Angular.io Webpack Intro with VS 2015 Update 3 - documentation #3227

miladchamo opened this issue Feb 9, 2017 · 6 comments

Comments

@miladchamo
Copy link

I am reporting an issue with the Anglular.io webpack intro documentation and VS 2015 Update 3. This is related to #14387.

Current behavior
I am using the Angular webpack intro docs/sample with Visual Studio 2015 and Typescript 2. After completing all steps, when I try to start the site via npm start, I get a bunch of compile errors that state 'cannot find promise', 'cannot find map', or 'cannot find require'.

image

Expected behavior
I expect the site to build, and then start. Note, a few months back, I previously followed the same exact steps. Back then, I believe the dependency was Typscript 1.8 and Angular 2.1.0; and everything worked without issues. I was probably also using an earlier version of npm/node, I think they were npm 3.3, and node 4.x.

Minimal reproduction of the problem with instructions
simply setup an empty MVC project with VS 2015, and follow the steps outlined in the Angular webpack intro docs

What is the motivation / use case for changing the behavior?
Having correct documentation/steps documented.

Please tell us about your environment:
Windows 7, VS 2015, npm version 3.10.10, node v6.9.5. Note, if I use the angular-cli to generate a new angular app, on this same machine, I am able to do so without issues.

Angular version: 2.0.X
Angular 2.4.0

Browser:
all

Language:
Typescript

@Foxandxss
Copy link
Member

I am not familiar at all with VS2015. Are you creating the Angular like an inner project inside an asp.net mvc project or something?

@miladchamo
Copy link
Author

Correct, looking to add into an empty Asp.net MVC app, in VS 2015.

@miladchamo
Copy link
Author

To help in reproducing the issue, I've created a repository, which contains the sample that I setup. The sample can be found here

@Foxandxss
Copy link
Member

Nice. I will see if anyone on the team has VS, I don't and even if I do, I don't know enough VS nor asp.net mvc to see if you are doing wrong.

That being said, on a simple view, You have everything in root which sounds REALLY weird to me

@Foxandxss
Copy link
Member

I see the issue now, I am going to fix it, in the mean time, in webpack.common.js, the loader for ts is like:

          {
              test: /\.ts$/,
              loaders: ['awesome-typescript-loader', 'angular2-template-loader']
          },

@miladchamo
Copy link
Author

@Foxandxss as you suggested, changing the loaders, like above, fixes the issue. Thanks for the quick turnaround.

I assume the documentation on angular.io will also get updated, correct?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants