2013-12-13 45 views
2

更新Node.js的0.10.23後,我試圖安裝時的呼嚕聲有錯誤。NPM安裝「添加緩存目錄」的錯誤在Windows 7

系統:Win7 x64。節點版本:0.10.23,npm版本:1.3.17

66 silly lockFile d63f3d0b-grunt-cli [email protected] 
67 error Error: Adding a cache directory to the cache will make the world implode. 
67 error  at addLocalDirectory (c:\nodejs\node_modules\npm\lib\cache.js:1120:45) 
67 error  at c:\nodejs\node_modules\npm\lib\cache.js:1173:7 
67 error  at cb (c:\nodejs\node_modules\npm\lib\utils\tar.js:150:7) 
67 error  at c:\nodejs\node_modules\npm\lib\utils\tar.js:147:9 
67 error  at c:\nodejs\node_modules\npm\node_modules\lockfile\lockfile.js:61:41 
67 error  at Object.oncomplete (fs.js:107:15) 
68 error If you need help, you may report this *entire* log, 
68 error including the npm and node versions, at: 
68 error  <http://github.com/isaacs/npm/issues> 
69 error System Windows_NT 6.1.7601 
70 error command "c:\\nodejs\\node.exe" "c:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "grunt-cli" 
71 error cwd z:\home\minpik.lc\www 
72 error node -v v0.10.23 
73 error npm -v 1.3.17 
74 verbose exit [ 1, true ] 

Thx,all。看起來像node.js 0.10.23 buged的東西。我完全刪除了最新版本並安裝了0.8.9,現在沒關係。

+0

在節點 – sachinjain024

回答

0

我有完全相同的問題,它看起來只是版本0.10.23這就是問題所在。我安裝了0.10.22,一切正常。

0

在升級節點版本之前,您必須完全刪除較早版本的節點。如果你想不同版本的節點之間切換,使用Node version manager

要升級到節點版本0.10使用NVM,

nvm install 0.10 

要使用舊版本的節點(比如0.8)

nvm use 0.8 

我發現nvm真正有用的工具來切換不同的節點版本。嘗試一下!! NVM僅適用於Linux環境。

對於窗口,您可以使用NVMW。看到這個BLOG有很好的幫助。

+0

中升級版本之前,您需要完全刪除較早版本的節點現在,我無法安裝NVM。 「npm i -g nvm」,返回相同的錯誤 –

+0

問題出在node.js版本中。而NVM真的很有趣,我會在ubuntu上試用它,thx。 –

+0

它在ubuntu上就像魅力一樣。我幾乎每次使用它時都需要修復一個跨版本的bug。如果你可以在linux上開發,我建議你總是使用linux而不是windows – sachinjain024