sous-chefs / sous-chefs/nodejs

nodejs_npm with json is not idempotent

Open
#39 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug hacktoberfest Priority: Low
Dominant language
Ruby
Stars
228
Forks
186
Avg merge
5h 45m
Merged PRs (30d)
1

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the nodejs_npm LWRP and trace how the packages.json project is checked before npm install runs. Compare the current package, version, and path checks with the project's name, version, and dependency state; done means repeated converges do not run npm install when the project is already satisfied.

Written by the indexing model from the issue text.

Assessment

Tech stack
nodejs, ruby
Domain
devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.