nodejs
nodejs copied to clipboard
npm won't get re-installed after node update
Given:
- node installed using binary method
- npm installed using source method
When:
- update node version
- leave npm version unchanged
Then
- embbed npm of node is used.
npm recipe should check the current npm version and re-install if is below the version specified in attributes. Ark only checks if the directory already exists (eg /usr/local/node-3.8.0).
same for me
Recipe: nodejs::npm_from_source
* ark[npm] action install_with_make
* directory[/usr/local/npm-3.8.1] action create (up to date)
* remote_file[/var/chef/cache/npm-3.8.1.tgz] action create (up to date)
* execute[unpack /var/chef/cache/npm-3.8.1.tgz] action nothing (skipped due to action :nothing)
* execute[set owner on /usr/local/npm-3.8.1] action nothing (skipped due to action :nothing)
* execute[autogen /usr/local/npm-3.8.1] action nothing (skipped due to action :nothing)
* execute[configure /usr/local/npm-3.8.1] action nothing (skipped due to action :nothing)
* execute[make /usr/local/npm-3.8.1] action nothing (skipped due to action :nothing)
* execute[make install /usr/local/npm-3.8.1] action nothing (skipped due to action :nothing)
(up to date)
we have this issue too
+1
+1
my hotfix for this:
file '/usr/local/bin/npm' do
action :delete
end
link '/usr/local/bin/npm' do
to '/usr/local/npm-' + node['nodejs']['npm']['version'] + '/bin/npm-cli.js'
end
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.
Part of a whole set of upgrade issues.