Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Forcing grunt plugin update

Tags:

npm

gruntjs

I'm using Grunt with the grunt-contrib-copy plugin. Recently a new version (0.4.1) was committed which has a nice new feature that I'd like to take advantage of. But, when I try to update using npm update grunt-contrib-copy, nothing happens.

Here's my current version:

$ sudo npm list grunt-contrib-copy
[email protected] /Users/username/src/project/UI
└── [email protected] 

Here's my update attempt:

$ sudo npm update grunt-contrib-copy

No output -- and npm list still shows 0.4.0.

Verifying the latest version available:

$ sudo npm info grunt-contrib-copy
npm http GET https://registry.npmjs.org/grunt-contrib-copy
npm http 200 https://registry.npmjs.org/grunt-contrib-copy

{ name: 'grunt-contrib-copy',
  description: 'Copy files and folders.',
  'dist-tags': { latest: '0.4.1' },
  versions: 
   [ '0.2.0',
    ... other versions snipped ...
     '0.4.0',
     '0.4.1' ],
  maintainers: 
   [ 'tkellen <[email protected]>',
     'cowboy <[email protected]>',
     'shama <[email protected]>' ],
  time: 
   { '0.2.0': '2012-09-10T22:26:15.048Z',
    ... other versions snipped ...
     '0.4.0': '2013-02-18T17:24:36.757Z',
     '0.4.1': '2013-03-26T20:08:14.079Z' },
  author: 'Grunt Team (http://gruntjs.com/)',
  repository: 
   { type: 'git',
     url: 'git://github.com/gruntjs/grunt-contrib-copy.git' },
  version: '0.4.1',

  ... other config info snipped ...

  dist: 
   { shasum: 'f0753b40ae21bb706daefb0b299e03cdf5fa9d6e',
     tarball: 'http://registry.npmjs.org/grunt-contrib-copy/-/grunt-contrib-copy-0.4.1.tgz' },
  directories: {} }

What am I missing here? Why won't npm update this plugin to the currently available version?

like image 640
Doug Harris Avatar asked Mar 29 '13 20:03

Doug Harris


2 Answers

Currently there is an open issue in NPM which talks about same thing. npm update does not update devDependencies while npm install works fine.

https://github.com/isaacs/npm/issues/2369

So what I can recommend is try to use npm install instead:

$ sudo npm install grunt-contrib-copy --save-dev
like image 121
Qorbani Avatar answered Sep 16 '22 23:09

Qorbani


You could look at …

npm install grunt-dev-update --save-dev

From https://npmjs.org/package/grunt-dev-update

like image 38
Mindeater Avatar answered Sep 18 '22 23:09

Mindeater