From 40a886080d407bff932cf0474c615980809e0696 Mon Sep 17 00:00:00 2001 From: Maxim Kotelnikov Date: Tue, 2 May 2017 16:21:24 +0200 Subject: [PATCH] Fix NPM installation by changing target user Links like https://raw.githubusercontent.com/joyent/node/v7.9.0/deps/npm/package.json are not available anymore. Instead, it's necessary to use https://raw.githubusercontent.com/nodejs/node/v7.9.0/deps/npm/package.json --- get_npm.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/get_npm.js b/get_npm.js index b4deca4..92a2632 100644 --- a/get_npm.js +++ b/get_npm.js @@ -3,11 +3,11 @@ var util = require('util'), path = require('path'), wget = require('./wget'); -var NPM_PKG_JSON_URL = 'https://raw.githubusercontent.com/%s/%s/deps/npm/package.json'; -// https://github.com/npm/npm/tags +var NPM_PKG_JSON_URL = 'https://raw.githubusercontent.com/%s/%s/deps/npm/package.json'; +// https://github.com/npm/npm/tags var NVMW_NPM_MIRROR = process.env.NVMW_NPM_MIRROR || 'https://github.com/npm/npm/archive'; var BASE_URL = NVMW_NPM_MIRROR + '/v%s.zip'; - + var targetDir = process.argv[2]; var versions = process.argv[3].split('/'); var binType = versions[0]; @@ -41,7 +41,7 @@ if (binType === 'iojs') { downloadNpmZip(npmVersion); }); } else { - var pkgUri = util.format(NPM_PKG_JSON_URL, 'joyent/node', + var pkgUri = util.format(NPM_PKG_JSON_URL, 'nodejs/node', binVersion === 'latest' ? 'master' : binVersion); wget(pkgUri, function (filename, pkg) { if (filename === null) {