簡體   English   中英

嘗試安裝指南針 npm ERR 時出錯! 無法讀取未定義的屬性“長度”

[英]Getting error when trying to install compass npm ERR! Cannot read property 'length' of undefined

我正在嘗試將指南針安裝到我的托管服務器上,但我不斷將上述錯誤反饋給 shell。

npm ERR! Cannot read property 'length' of undefined

經過一些變通之后,我已經安裝了 node、grunt、contrib-watch 和 contrib-uglify。 我需要的最后一個依賴是指南針。

在我到達最底層之前,我沒有在日志中看到任何錯誤:

4924 error Linux 3.12.18-clouder0
4925 error argv "/home/joshuag3/bin/node" "/home/joshuag3/bin/npm" "install" "grunt-contrib-watch" "--save-dev"
4926 error node v4.4.1
4927 error npm  v2.14.20
4928 error code EPEERINVALID
4929 error peerinvalid The package grunt@1.0.1 does not satisfy its siblings' peerDependencies requirements!
4929 error peerinvalid Peer grunt-contrib-uglify@0.2.7 wants grunt@~0.4.0
4930 verbose exit [ 1, true ]

我對節點和這種類型的東西非常陌生。 如果有解決方案,請過度解釋。

查看谷歌 - 在 github 上有很多類似的問題。 也許你會在那里找到你的答案。

打開您的cmd並轉到您的根用戶文件夾,例如C:\\Users\\User並運行npm install -g npm@latest

這會將您的 npm 更新到最新版本。 再次嘗試安裝,現在應該可以正常工作了。

此外,您可以在npm install -g npm@latest之后使用npm audit fix

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM