首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >正在强制grunt插件更新

正在强制grunt插件更新
EN

Stack Overflow用户
提问于 2013-03-30 04:24:54
回答 3查看 11.8K关注 0票数 6

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

以下是我当前的版本:

代码语言:javascript
复制
$ sudo npm list grunt-contrib-copy
UI@2.0.89 /Users/username/src/project/UI
└── grunt-contrib-copy@0.4.0 

这是我的更新尝试:

代码语言:javascript
复制
$ sudo npm update grunt-contrib-copy

没有输出-- npm list仍然显示0.4.0。

验证可用的最新版本:

代码语言:javascript
复制
$ 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: {} }

这里我漏掉了什么?为什么npm不会将这个插件更新到当前可用的版本?

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2013-03-30 06:19:15

目前在NPM中有一个公开的问题,它谈到了同样的事情。npm update不会更新devDependencies,而npm install运行良好。

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

因此,我建议您尝试使用npm install:

代码语言:javascript
复制
$ sudo npm install grunt-contrib-copy --save-dev
票数 10
EN

Stack Overflow用户

发布于 2013-12-30 12:25:43

你可以看看…

代码语言:javascript
复制
npm install grunt-dev-update --save-dev

来自https://npmjs.org/package/grunt-dev-update

票数 2
EN

Stack Overflow用户

发布于 2013-12-30 22:05:16

sudo npm update grunt-*现在似乎运行得很好。

issue https://github.com/isaacs/npm/issues/2369现已关闭。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/15710883

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档