@bobfrankston/npmglobalize 1.0.145 → 1.0.146
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib.js +7 -20
- package/package.json +1 -1
package/lib.js
CHANGED
|
@@ -3561,17 +3561,11 @@ export async function globalize(cwd, options = {}, configOptions = {}) {
|
|
|
3561
3561
|
console.log(colors.green(`✓ Installed globally: ${pkgName}@${pkgVersion}`));
|
|
3562
3562
|
}
|
|
3563
3563
|
else {
|
|
3564
|
-
// Registry install failed —
|
|
3564
|
+
// Registry install failed — check if it's an auth issue
|
|
3565
3565
|
const auth = checkNpmAuth();
|
|
3566
3566
|
if (!auth.authenticated) {
|
|
3567
|
-
console.
|
|
3568
|
-
|
|
3569
|
-
else {
|
|
3570
|
-
console.log(colors.yellow(` Registry install failed — falling back to local install...`));
|
|
3571
|
-
}
|
|
3572
|
-
const localFallback = runCommand('npm', ['install', '-g', '.'], { cwd, silent: false, showCommand: true });
|
|
3573
|
-
if (localFallback.success) {
|
|
3574
|
-
console.log(colors.green(`✓ Installed globally from local: ${pkgName}@${pkgVersion}`));
|
|
3567
|
+
console.error(colors.red(` Registry install failed — npm auth problem: ${auth.error || 'unknown'}`));
|
|
3568
|
+
console.error(colors.yellow(` Run 'npm login' to fix, then: npm install -g ${pkgName}@${pkgVersion}`));
|
|
3575
3569
|
}
|
|
3576
3570
|
else {
|
|
3577
3571
|
console.error(colors.red(`✗ Global install failed`));
|
|
@@ -4280,19 +4274,12 @@ export async function globalize(cwd, options = {}, configOptions = {}) {
|
|
|
4280
4274
|
console.log(colors.green(`✓ Installed globally: ${pkgName}@${pkgVersion}`));
|
|
4281
4275
|
}
|
|
4282
4276
|
else {
|
|
4283
|
-
// Registry install failed —
|
|
4284
|
-
// Fall back to local install which doesn't need registry auth.
|
|
4277
|
+
// Registry install failed — check if it's an auth issue
|
|
4285
4278
|
const auth = checkNpmAuth();
|
|
4286
4279
|
if (!auth.authenticated) {
|
|
4287
|
-
console.
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
console.log(colors.yellow(` Registry install failed — falling back to local install...`));
|
|
4291
|
-
}
|
|
4292
|
-
const localFallback = runCommand('npm', ['install', '-g', '.'], { cwd, silent: false, showCommand: true });
|
|
4293
|
-
if (localFallback.success) {
|
|
4294
|
-
globalInstallOk = true;
|
|
4295
|
-
console.log(colors.green(`✓ Installed globally from local: ${pkgName}@${pkgVersion}`));
|
|
4280
|
+
console.error(colors.red(`✗ Global install failed — npm auth problem: ${auth.error || 'unknown'}`));
|
|
4281
|
+
console.error(colors.yellow(` Run 'npm login' to fix, then: npm install -g ${pkgName}@${pkgVersion}`));
|
|
4282
|
+
recordBuildIssue(pkgName, 'warning', `Global install failed (${auth.error || 'auth issue'}) — run 'npm login'`);
|
|
4296
4283
|
}
|
|
4297
4284
|
else {
|
|
4298
4285
|
console.error(colors.red(`✗ Global install failed`));
|