0

Is there any way to change command used to build a Node.js project after deploying code to Azure?

I can't use

node install

to install (download dependencies of) my project, because of some issue [described here] (too long paths of some modules).

I wanted to use dedupe command or some bash script that I found here:

npm ls | grep "^│ .* [^ ]@[^ ]$" | rev | cut -d " " -f1 | rev | sort -u -t "@" -k1,1 |xargs -L 1 npm install --no-registry --loglevel error

to solve this problem, but I don't know how to run those commands on Azure. Is it possible?

Community
  • 1
  • 1
Piotrek
  • 10,919
  • 18
  • 73
  • 136

1 Answers1

1

You can try running the command from the diagnostic console via KUDU services.

To access KUDU simply add ".scm" before .azurewebsites.net.

For example, if your website is mywebsite.azurewebsites.net, you would browse to mywebsite.scm.azurewebsites.net

Once there click on Debug Console and then CMD

More information can be found here: http://blogs.msdn.com/b/benjaminperkins/archive/2014/03/24/using-kudu-with-windows-azure-web-sites.aspx

Joe Raio
  • 1,795
  • 1
  • 12
  • 17
  • Sorry for not responding to your questions; I wanted to try it, but this debug console doesn't open properly in my browser. There is some "loading" sign here, nothing happens. There is other link "use old console" here, but it doesn't load anything too. – Piotrek Aug 30 '15 at 09:45
  • I've finally decided to use some other hosting for my website, because Microsoft Azure seems to be too "buggy" while running Node.JS apps. – Piotrek Aug 30 '15 at 09:49