Hoppe
Hoppe

Reputation: 6805

Azure won't download npm packages in package.json after deployment

How do I get Azure to download the npm packages when deploying to an Azure website? I have a package.json file, but none appear to be downloading.

I've found some resources online but none seem to be using the new Azure portal so haven't been able to make any progress.

It is a TypeScript project.

I believe I'm using an Azure App Service.

Upvotes: 2

Views: 1498

Answers (1)

Hoppe
Hoppe

Reputation: 6805

As per AJ's suggestion, I did the following:

  1. Clicked on app service, and then the name of the corresponding App Service
  2. Clicked on Tools > Console
  3. "npm install" simply responded with "bad request", so I ran the command "npm config set registry http://registry.npmjs.org"
  4. "npm cache clean"
  5. The commands take a while, without giving any feedback, but then finally the prompt came back
  6. "npm install" then worked. The command didn't produce any feedback, but I then confirmed through the browser that the packages has downloaded

Upvotes: 7

Related Questions