2016-07-04 77 views
4
$ npm update [email protected] 

$ npm update -d 
npm info it worked if it ends with ok 
npm info using [email protected] 
npm info using [email protected] 
npm info attempt registry request try #1 at 5:33:55 PM 
npm http request GET https://registry.npmjs.org/jshint 
npm http 200 https://registry.npmjs.org/jshint 
npm info ok 


$ npm install jshint 
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher                             to avoid a RegExp DoS issue 
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher                             to avoid a RegExp DoS issue 
[email protected] node_modules\jshint 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] ([email protected]) 
├── [email protected] 
├── [email protected] ([email protected]) 
├── [email protected] ([email protected], [email protected], [email protected], d                            [email protected], [email protected]) 
└── [email protected] ([email protected]) 
+0

npm WARN棄用[email protected]:請更新至minimatch 3.0.2或更高版本以避免RegExp DoS問題 –

+1

這很好。你有問題嗎?這個網站是編程問題,而不是轉儲一些終端輸出的地方。 –

+0

是的我的問題是你之前遇到過這個問題還是有一個想法如何解決它 –

回答

0

試試這個(爲OSX)

進入終端須藤喬敦 - R的$ USER的/ usr /本地

+0

雖然這是一種解決這個問題的方法,但我始終認爲這是最不利的。而不是更改系統文件的所有者,運行'npm config set prefix $ HOME/.node_modules'更有意義https://docs.npmjs.com/getting-started/fixing-npm-permissions –

0

適用於我降級到節點v4.4.7並在終端中使用sudo chown -R $ USER/usr/local。

1

很抱歉這麼晚纔回復..

sudo npm install 

嘗試this..this作品對我來說,安裝NPM

要更新使用這個..

sudo npm install -g [email protected] 
相關問題