Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove npm version-specific installation from setup #27717

Merged
merged 1 commit into from Mar 27, 2019
Merged

Conversation

wjordan
Copy link
Contributor

@wjordan wjordan commented Mar 26, 2019

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 unnecessary npm-downgrade step that itself triggers bugs/issues.

Specific bug/issue prompting this PR: The nodejs_npm 'npm' resource (for pinning a specific npm version) executes npm install -g npm@3 as root (required, because npm global modules are installed to root-owned /usr/lib/node_modules). In recent versions of npm (>= 4.4.0; our current pinned node version 8.15.1 is bundled with npm v6.4.1), a bug causes $HOME/.config/configstore/update-notifier-npm.json to be created with root 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.

No longer pin any specific version of npm in our installation process.
Node now comes bundled with a recent `npm` version and we use (a pinned
version of) `yarn` for managing node modules anyway, so this removes an
unnecessary `npm`-downgrade step that itself triggers bugs/issues.
Copy link
Member

@davidsbailey davidsbailey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@wjordan wjordan merged commit 41854d0 into staging Mar 27, 2019
@wjordan wjordan deleted the npm-remove branch March 27, 2019 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants