2013-03-29 48 views
6

我正在使用Gruntgrunt-contrib-copy插件。最近有一個新版本(0.4.1)被提交,它有一個很好的新功能,我想利用它。但是,當我嘗試使用npm update grunt-contrib-copy更新時,沒有任何反應。強制執行grunt插件更新

這是我目前的版本:

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

這是我更新的嘗試:

$ sudo npm update grunt-contrib-copy 

無輸出 - 和npm list仍顯示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 <[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: {} } 

缺少什麼我在這裏?爲什麼不會npm更新這個插件到當前可用的版本?

回答

10

當前NPM中存在一個公開的問題,它討論同樣的事情。當npm安裝正常工作時,npm更新不會更新devDependencies。

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

所以,我可以建議是嘗試使用NPM安裝,而不是:

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

使用安裝的竅門。感謝指向開放式錯誤的指針。 –

+1

是否有快速更新所有devDependencies的方法? – curtisblackwell