我正在尝试更新我的核素服务器。 sudo npm update -g nuclide --verbose
的输出是:
$ 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 npm@4.2.0
npm info using node@v7.9.0
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
搜索Google并未提供任何帮助,他们都提到package.json
并更改了一些内容,但我没有package.json
(可能是因为我是全局安装)。我如何找到配置或做其他事情才允许我更新我的核素包?
系统信息:
答案 0 :(得分:1)
你正在寻找的package.json配置是你在/usr/local
的Windows上安装节点的地方。在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
。