Skip to content
This repository was archived by the owner on May 14, 2021. It is now read-only.
This repository was archived by the owner on May 14, 2021. It is now read-only.

Error converging with packages that have newer version not in latest release channel #5

@teknofire

Description

@teknofire

I'm running into an error trying to converge nodes that have npm packages with newer versions in release channels other than @latest. Two packages that currently appear to have this issue are npm, and pm2 although as soon as they push those new versions to @latest the issue will be fixed. I'm guessing it's related to something similar to this explanation: npm/npm#10687

Basically the behavior i'm seeing is that the first converge will succeed with the following recipe

node_package 'pm2' do
  version 'latest'
end

Then on the second converge it will generate the following error:

             ================================================================================
             Error executing action `install` on resource 'node_package[pm2]'
             ================================================================================

             Mixlib::ShellOut::ShellCommandFailed
             ------------------------------------
             Expected process to exit with [0], but received '1'
             ---- Begin output of ["/opt/nodejs-4.5.0/bin/node", "/opt/nodejs-4.5.0/bin/npm", "outdated", "--json", "--global"] ----
             STDOUT: {
        "npm": {
          "current": "4.0.3",
          "wanted": "4.0.5",
          "latest": "4.0.3",
          "location": "/opt/nodejs-4.5.0/lib/node_modules/npm"
        },
        "pm2": {
          "current": "2.1.6",
          "wanted": "2.2.0",
          "latest": "2.1.6",
          "location": "/opt/nodejs-4.5.0/lib/node_modules/pm2"
        }
             }
             STDERR:
             ---- End output of ["/opt/nodejs-4.5.0/bin/node", "/opt/nodejs-4.5.0/bin/npm", "outdated", "--json", "--global"] ----
             Ran ["/opt/nodejs-4.5.0/bin/node", "/opt/nodejs-4.5.0/bin/npm", "outdated", "--json", "--global"] returned 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions