2

Having a hard time trying to figure out why my dotnet new angular application has a node dependency when running through iis? Using Visual Studio Code and dotnet core 1.0.4, after publishing, my application still has a dependency on node.js? Not sure why. We are running the application through iis, but our production server does not have node installed and this results in a 500 status code. We are using Microsoft spa package which has angular 2.

Has anyone else had any similar issue?

How can I remove the node dependency?

2 Answers 2

1

It looks like your using the Microsoft.AspNetCore.SpaTemplates for this. If so, you have two options to create a production build:

  1. Use the command dotnet publish -c Release
  2. Use the publish option under the build menu in Visual Studio 2017

A good tutorial and walkthrough can be found here

Sign up to request clarification or add additional context in comments.

2 Comments

so by using option 1, then there will be no node dependency?
Correct, once you do a production build, any web server capable of serving static files should be able to host your application.
0

You need to deploy the build.

you can get the build static content through.

 ng build --prod --aot 

It will create a dist folder deploy that code.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.