Answered npm fails on git dependencies in package.json

  • Monday, December 10, 2012 2:39 PM
     
     

    I have the following dependency in my package.json:

    "locomotive": "git://github.com/aejay/locomotive.git#master"

    When `npm install` is run locally, the install runs fine. When it is deployed (I am using a github deployment, so it happens on push), I get this error:

        CreateProcessW: The system cannot find the file specified.

        `git "clone" "git://github.com/aejay/locomotive.git#master" "C:\\DWASFiles\\Sites\\[site-name]\\Temp\\npm-6548\\1355148333320-0.58272026758641"

    The deployment then fails. The only way I can reference these packages is by referring to the tarball files for them from github. This works as a workaround for me, but this is an issue that I'm sure has to be causing others trouble, too.

    I'm not sure if it's complaining that it can't find `git`, or if the temporary directory (npm-6548) doesn't exist.

    Ideas?

    Edit:

    Here is the exact error output from Azure's deployment log:

    npm ERR! git clone git://github.com/aejay/locomotive.git#master CreateProcessW: The system cannot find the file specified.
    npm ERR! Error: `git "clone" "git://github.com/aejay/locomotive.git#master" "C:\\DWASFiles\\Sites\\[site-name]\\Temp\\npm-6548\\1355148333320-0.58272026758641"` failed with 127
    npm ERR!     at ChildProcess.<anonymous> (D:\Program Files (x86)\nodejs\node_modules\npm\lib\utils\exec.js:56:20)
    npm ERR!     at ChildProcess.emit (events.js:70:17)
    npm ERR!     at maybeExit (child_process.js:358:16)
    npm ERR!     at Socket.<anonymous> (child_process.js:463:7)
    npm ERR!     at Socket.emit (events.js:67:17)
    npm ERR!     at Array.<anonymous> (net.js:335:10)
    npm ERR!     at EventEmitter._tickCallback (node.js:190:38)
    npm ERR!  [Error: `git "clone" "git://github.com/aejay/locomotive.git#master" "C:\\DWASFiles\\Sites\\[site-name]\\Temp\\npm-6548\\1355148333320-0.58272026758641"` failed with 127]

    • Edited by Aejay Monday, December 10, 2012 6:32 PM Added details
    •  

All Replies

  • Monday, December 10, 2012 5:29 PM
    Owner
     
     
    Did you mean that the push to github is failing?
  • Monday, December 10, 2012 6:14 PM
     
     

    No. Pushing to github is working fine. Since the azure site is connected to the repository, that triggers the deployment on Azure's side.

    It pulls down the project repository from github without issue, but when it hits the "Run NPM" step, it throws out the error above.

  • Monday, December 10, 2012 6:34 PM
    Owner
     
     
    @Aejay: could you please share a minimal repo (e.g. on Github) that we can directly try pushing to Azure to see what you're seeing? That would help make sure that we are trying the exact same thing as you. Thanks!
  • Monday, December 10, 2012 6:44 PM
    Owner
     
     
    Also, as an additional test, do you get similar errors when you push your local repo directly to Azure instead of via Github continuous deployment?
  • Monday, December 10, 2012 7:42 PM
     
     

    I haven't tried that yet, but I can do so in a few minutes.

    Here is a fresh test repo that shows the same symptoms:

    https://github.com/aejay/azure-test

    Edit:

    Or not. The network proxy I'm working through right now won't let me push to the repository. If you push a copy of that repo to a site, though, you should get the same result (I hope, otherwise I'll look like a fool).

    • Edited by Aejay Monday, December 10, 2012 8:05 PM
    •  
  • Tuesday, December 11, 2012 1:25 AM
     
     Answered

    Open a bug on this:

    https://github.com/projectkudu/kudu/issues/254

    Manually pushing the change would work but through GitHub it will currently fail, the part that's failing is to find git.exe since you're using a git url to install the npm package.

    Using a tarball link should work though:

        "locomotive": "https://github.com/aejay/locomotive/tarball/master"