2017-05-12 81 views
0

我正在嘗試更新我的核素服務器。的sudo npm update -g nuclide --verbose輸出是:package.json用於全局安裝的軟件包

$ sudo npm update -g --dev nuclide --verbose 
npm info it worked if it ends with ok 
npm verb cli [ '/usr/bin/nodejs', 
npm verb cli '/usr/bin/npm', 
npm verb cli 'update', 
npm verb cli '-g', 
npm verb cli '--dev', 
npm verb cli 'nuclide', 
npm verb cli '--verbose' ] 
npm info using [email protected] 
npm info using [email protected] 
npm verb request uri https://registry.npmjs.org/nuclide 
npm verb request no auth needed 
npm info attempt registry request try #1 at 11:02:17 AM 
npm verb request id bf1180b825d1a807 
npm verb etag W/"590a3387-6633d" 
npm verb lastModified Wed, 03 May 2017 19:46:15 GMT 
npm http request GET https://registry.npmjs.org/nuclide 
npm http 304 https://registry.npmjs.org/nuclide 
npm verb headers { date: 'Fri, 12 May 2017 11:02:17 GMT', 
npm verb headers via: '1.1 varnish', 
npm verb headers 'cache-control': 'max-age=300', 
npm verb headers etag: 'W/"590a3387-6633d"', 
npm verb headers age: '132', 
npm verb headers connection: 'keep-alive', 
npm verb headers 'x-served-by': 'cache-syd1625-SYD', 
npm verb headers 'x-cache': 'HIT', 
npm verb headers 'x-cache-hits': '1', 
npm verb headers 'x-timer': 'S1494586937.425880,VS0,VE0', 
npm verb headers vary: 'Accept-Encoding' } 
npm verb etag https://registry.npmjs.org/nuclide from cache 
npm verb get saving nuclide to /home/daniel/.npm/registry.npmjs.org/nuclide/.cache.json 
npm verb correctMkdir /home/daniel/.npm correctMkdir not in flight; initializing 
npm verb outdated not updating nuclide because it's currently at the maximum version that matches its specified semver range 
npm verb exit [ 0, true ] 
npm info ok 

搜索谷歌一直沒有打開任何東西,以幫助這一點,他們都指package.json,並在那裏改變一些東西,但我沒有package.json(可能是因爲我全球安裝這個)。我如何找到配置或做其他事情來讓我更新我的核素包?

系統信息:

  • 的Ubuntu 16.04
  • NPM版本:4.2.0
  • 節點版本:V7.9.0
  • 當前核素版本:217

回答

1

的package.json配置你的需求是在最初安裝節點的地方,在Windows的/usr/local。在unix系統上,它可以通過usr/local/lib/node/usr/local/lib/node_modules找到。

你也可以運行sudo npm root -g找到你的安裝位置。

此外,它可以通過以下鏈接找到nodejs應用程序,它將帶你到你的安裝文件夾。這些鏈接是在成功灌輸後進行的。

之後,您可以刪除/更新package.json內的依賴關係,然後再次運行npm i -g。

具體在您的版本上,您的安裝文件夾是/usr/local/lib/node_modules

+0

恐怕它不在這些位置,任何其他想法? –

+0

根據你發佈的內容'/ usr/bin/npm'是你的npm安裝的地方..所以它確實存在嗎? –

+0

沒錯,它在那裏 –