nodejs icon indicating copy to clipboard operation
nodejs copied to clipboard

npm won't get re-installed after node update

Open rmoriz opened this issue 9 years ago • 7 comments

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).

rmoriz avatar Mar 10 '16 14:03 rmoriz

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)

eagleeye avatar Mar 15 '16 11:03 eagleeye

we have this issue too

ebdrup avatar Mar 15 '16 11:03 ebdrup

+1

bubenshchykov avatar Apr 04 '16 12:04 bubenshchykov

+1

raymatos avatar Sep 19 '16 17:09 raymatos

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

eagleeye avatar Oct 04 '16 10:10 eagleeye

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.

github-actions[bot] avatar Sep 30 '20 00:09 github-actions[bot]

Part of a whole set of upgrade issues.

MarkGibbons avatar Oct 03 '20 19:10 MarkGibbons