Remove npm version-specific installation from setup #27717
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No longer pin any specific version of
npm
in our installation process.Recent versions of Node come bundled with recent
npm
versions, and we use (a pinned version of)yarn
for managing node modules anyway, so this PR removes an unnecessarynpm
-downgrade step that itself triggers bugs/issues.Specific bug/issue prompting this PR: The
nodejs_npm 'npm'
resource (for pinning a specific npm version) executesnpm install -g npm@3
asroot
(required, becausenpm
global modules are installed toroot
-owned/usr/lib/node_modules
). In recent versions ofnpm
(>= 4.4.0; our current pinnednode
version 8.15.1 is bundled withnpm
v6.4.1), a bug causes$HOME/.config/configstore/update-notifier-npm.json
to be created withroot
permissions when this command is run. This causes permission errors the next time a user-process tries to create files/folders within$HOME/.config
.Part of the PR diff includes some changes to Chef / Test Kitchen / Berkshelf config, which needed a bit of a refresh to run the (manual) integration tests used for verifying the cookbook changes within a Docker container.