2

I am deploying my first asp.net core website. We are using NPM to manage packages from a dev perspective, but I was not under the impression that would make node js a requirement on the server hosting the website?

Right now, I'm getting "InvalidOperationException: Failed to start Node process" if I try to run the website. In an effort to keep the server as lean as possible, I would prefer not having node js on there. Plus, I have a concern it will try to update / download packages at runtime rather than include them when I deploy (from Visual Studio 2017 deploy to file option).

7
  • NPM is a package manager written in Javascript. You will have to ditch that dependency Commented Jun 5, 2017 at 18:30
  • I know we're using NPM to manage our dependencies, but can't find a way to still manage dependencies with NPM without requiring NPM / Node on the server side. A bit like when using NUGET to manage dependencies, I don't need anything around nuget on the server. Commented Jun 5, 2017 at 18:39
  • I don't know much about .net core, so forgive my ignorance, but is part of your deployment process to npm install ? Is it possible npm install is trying to run at every single start? I would also think that you don't need NPM to run your website. Especially if these are all client side dependencies. Commented Jun 5, 2017 at 18:41
  • I have no refereneces to node or NPM in my startup code. NPM is required to deploy, to get any packages missing, but I'm not calling it server side. Once deployed, I'm expecting everything it needs is included in the deployed files. Commented Jun 5, 2017 at 18:55
  • well you will have to install node then. It is less than 40MB so you are gonna be fine. Commented Jun 5, 2017 at 19:02

1 Answer 1

1

The feature that is causing this problem is "Server Side Rendering". It can be disabled by removing:

@addTagHelper "*, Microsoft.AspNetCore.SpaServices"

From Views/_ViewImports.cshtml


See this stack SO question for more details.

How to disable server side rendering on an asp.netcore-spa application?

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

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.