Npm 强制grunt插件更新

Npm 强制grunt插件更新,npm,gruntjs,Npm,Gruntjs,我正在使用插件。最近提交了一个新版本(0.4.1),它有一个很好的新特性,我想利用它。但是,当我尝试使用npm update grunt contrib copy进行更新时,什么都没有发生 以下是我当前的版本: $ sudo npm list grunt-contrib-copy UI@2.0.89 /Users/username/src/project/UI └── grunt-contrib-copy@0.4.0 以下是我的更新尝试: $ sudo npm update grunt-co

我正在使用插件。最近提交了一个新版本(0.4.1),它有一个很好的新特性,我想利用它。但是,当我尝试使用
npm update grunt contrib copy
进行更新时,什么都没有发生

以下是我当前的版本:

$ sudo npm list grunt-contrib-copy
UI@2.0.89 /Users/username/src/project/UI
└── grunt-contrib-copy@0.4.0 
以下是我的更新尝试:

$ sudo npm update grunt-contrib-copy
没有输出,
npm列表仍然显示0.4.0

验证可用的最新版本:

$ 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 <tyler@sleekcode.net>',
     'cowboy <cowboy@rj3.net>',
     'shama <kyle@dontkry.com>' ],
  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: {} }
$sudo npm信息grunt contrib副本
npm http GEThttps://registry.npmjs.org/grunt-contrib-copy
npm http 200https://registry.npmjs.org/grunt-contrib-copy
{name:'grunt contrib copy',
描述:“复制文件和文件夹”,
'dist tags':{latest:'0.4.1'},
版本:
[ '0.2.0',
…其他版本被剪掉了。。。
'0.4.0',
'0.4.1' ],
维护人员:
[“tkellen”,
“牛仔”,
“萨玛”],
时间:
{'0.2.0':'2012-09-10T22:26:15.048Z',
…其他版本被剪掉了。。。
“0.4.0”:“2013-02-18T17:24:36.757Z”,
“0.4.1”:“2013-03-26T20:08:14.079Z”,
作者:Grunt团队(http://gruntjs.com/)',
存储库:
{type:'git',
网址:'git://github.com/gruntjs/grunt-contrib-copy.git' },
版本:“0.4.1”,
…其他配置信息被截取。。。
地区:
{shasum:'f0753b40ae21bb706daefb0b299e03cdf5fa9d6e',
柏油球:'http://registry.npmjs.org/grunt-contrib-copy/-/grunt-contrib-copy-0.4.1.tgz' },
目录:{}

我错过了什么?为什么npm不将此插件更新到当前可用的版本?

目前npm中有一个公开问题,它讨论了同样的问题。npm安装工作正常时,npm更新不会更新devdependency

因此,我建议您尝试改用npm安装:

$ sudo npm install grunt-contrib-copy --save-dev

你可以看看

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

sudo npm update grunt-*
看来现在可以正常工作了


问题现已解决。

使用install解决了问题。感谢您提供了指向开放bug的指针。欢迎使用SO。请考虑用代码标签编辑你的帖子,它看起来会更好;