nodejs icon indicating copy to clipboard operation
nodejs copied to clipboard

nodejs_npm with json is not idempotent

Open billyoung opened this issue 11 years ago • 5 comments

Running into an issue where using the nodejs_npm lwrp with a json (packages.json) file will run 'npm install' on every converge.

nodejs_npm 'node-app-name' do
  path '/path/to/app'
  json true
  user 'bill'
  group 'bill'
  version '1.2.3'
end

it appears that the LWRP only checks the package/version/path of individual node packages, as opposed to the "name" and "version" of the json project being installed and whether or not its dependencies have been satisfied.

billyoung avatar Sep 17 '14 17:09 billyoung

Hi @billyoung As I can see on #40 npm list -json format may have changed... What is you npm version?

guilhem avatar Sep 18 '14 08:09 guilhem

npm 1.4.23

billyoung avatar Sep 18 '14 13:09 billyoung

@billyoung can you do a npm install {anything} then a npm list -json in same directory?

guilhem avatar Sep 19 '14 08:09 guilhem

Marking stale due to inactivity. Remove stale label or comment or this will be closed in 7 days. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs.

github-actions[bot] avatar Sep 30 '20 00:09 github-actions[bot]

There's some tough issue around idempotence and repeated runs.

MarkGibbons avatar Oct 03 '20 20:10 MarkGibbons