sous-chefs/nodejs

nodejs_npm resource not idempotent

Closed this issue · 3 comments

Cookbook version

4.0.0

Chef-client version

Chef: 13.2.20

Platform Details

Ubuntu-12.04

Scenario:

nodejs_npm 'gulp'
  version '3.9'
end

This will run every time. Its failing the url_valid? method call in the nodejs helpers library

Steps to Reproduce:

Install node from binary version 4.4.5

nodejs_npm 'gulp' do
  version '3.9'
end

run converge twice (will install each time).

Expected Result:

In the url_valid? method in the nodejs helper library:

list.fetch(package, {}).fetch('resolved', '').include?('url')

the resolved key does not contain a url key.

Actual Result:

The output from npm list gulp -global -json is as follows:

{
  "dependencies": {
    "gulp": {
      "version": "3.9.1",
      "from": "gulp@>=3.9.0 <3.10.0",
      "resolved": "https://registry.npmjs.org/gulp/-/gulp-3.9.1.tgz"
    }
  }
}

Ditto with chef client 12.21 on RHEL 7.2. Same scenario.

Is a duplicate of #115 it seems ...

tas50 commented

New release will fix this