Search code examples
node.jsazurenpmsentryraven

Azure - Sentry's raven npm package not installing


I am using CircleCI to build the project and push it to a local repository provided by Azure's Web app. Up until I added raven as a package to repository everything worked fine, but suddenly, this single package is refusing to be installed on azure - with no error.

Even though when I connect to the console on Azure and check package.json I can see that raven is enlisted in dependencies (I made sure it is not in dev), for some reason it is never in node_modules.

Any ideas why this might be happening?

For what it's worth, build is being done on Ubuntu 14 (Circle), and it is being deployed to Windows Web App (Azure), however I fail to see how it could be relevant if node_modules are being installed for every step anew.


Solution

  • When you push a commit to Azure remote repo, the Azure deployment task will get the package.json and automatically install dependencies by running the following deployment script:

    :: 3. Install npm packages
    IF EXIST "%DEPLOYMENT_TARGET%\package.json" (
      pushd "%DEPLOYMENT_TARGET%"
      call :ExecuteCmd !NPM_CMD! install --production
      IF !ERRORLEVEL! NEQ 0 goto error
      popd
    )
    

    I am able to install raven-js by putting it to package.json and deploy my app to Azure Web App via Local Git repository.

    Here is my testing screenshot:

    enter image description here

    enter image description here

    If you don't want to deploy your app via SCM, you'll need to go to the root of your app and execute the command npm install --production manually in Kudu Debug console which can be accessed by: https://<yourwebsitename>.scm.azurewebsites.net/DebugConsole.

    enter image description here