sous-chefs / nodejs

Development repository for the nodejs cookbook
https://supermarket.chef.io/cookbooks/nodejs
Apache License 2.0
228 stars 195 forks source link

nodejs_npm with json is not idempotent #39

Open billyoung opened 10 years ago

billyoung commented 10 years ago

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.

guilhem commented 10 years ago

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

billyoung commented 10 years ago

npm 1.4.23

guilhem commented 10 years ago

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

github-actions[bot] commented 3 years ago

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.

MarkGibbons commented 3 years ago

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